https://kotlinlang.org logo
#announcements
Title
# announcements
a

Andreas Sinz

11/03/2017, 1:53 PM
@ayrat555 an
object
by the definition of Kotlin is a class that has a single instance (like a Singleton) and that instance is created automatically at startup, so there is no way to have abstract stuff inside an Object
a

ayrat555

11/03/2017, 1:57 PM
😢
a

alex.krupa

11/03/2017, 2:37 PM
Aren’t Kotlin
object
instances created the first time we use them (lazy instantiation)?
a

Andreas Sinz

11/03/2017, 4:53 PM
@alex.krupa oh, you are right.
object declarations are initialized lazily, when accessed for the first time
says the kotlin reference
2 Views