'lateinit' is for vars that will be initialized later. 'lazy' is for val properties initialized on first access.
← Kotlin theorytheory 0/50 · 0%
Fundamentals · easy
13. Lateinit vs Lazy
Delayed initialization.
Check your understanding
1. Which is for immutable values?
2. Can lateinit be used for primitives?