Properties, lazy & lateinit

KOTLIN › Language Idioms

Kotlin property mechanics: val/var/const, lazy vs lateinit, backing fields, custom accessors.

Properties are foundational Kotlin and a frequent warm-up that quickly exposes depth. Interviewers test whether you can pick lazy vs lateinit correctly, explain compile-time inlining of const val, and reason about backing fields and custom accessors. Strong answers cite concrete rules (no primitives in lateinit, lazy is val-only, thread-safety modes) rather than vague intuition.

What this covers

Study this topic

Further reading