When are Kotlin singletons (declared with the object modifier) instantiated?

Viewed 208

I can't find any information on when Kotling singletons are instantiated. I'm assuming it's the first time they are accessed but I can't confirm that anywhere.

object Singleton{
    val thing1 = 2
    val thing2 = "Hello"
}

When would this object be instantiated? When a property is first accessed? When something in the packaged is accessed? When the program is first run?

1 Answers
Related