Delegation

KOTLIN › Types & Classes

Drills Kotlin's by keyword for class delegation and property delegates.

Delegation is a frequent Kotlin interview topic because it shows you understand composition over inheritance and how the compiler rewrites property access. Interviewers test whether you know the difference between interface delegation and property delegates, the getValue/setValue operator contract, and the behavior of standard delegates like lazy, observable, and vetoable. Expect questions probing subtle gotchas such as the delegate-can't-see-overrides rule and lazy thread-safety modes.

What this covers

Study this topic

Further reading