Kotlin theorytheory 0/50 · 0%
Fundamentals · easy

13. Lateinit vs Lazy

Delayed initialization.

'lateinit' is for vars that will be initialized later. 'lazy' is for val properties initialized on first access.

Check your understanding

  1. 1. Which is for immutable values?

  2. 2. Can lateinit be used for primitives?