There are many implementations of the Singleton pattern. The above one is called lazy initialization. The equivalent in Kotlin is simply: object ...
確定! 回上一頁