Using 'object' instead of 'class' creates a thread-safe singleton instance.
← Kotlin theorytheory 0/50 · 0%
OOP · medium
32. Object Declarations (Singletons)
Singleton pattern in Kotlin.
Check your understanding
1. Keyword for singleton?
2. When is the object initialized?