How to create singleton class in kotlin?
Here is the best way to create a singleton class in Kotlin:
BY Best Interview Question ON 21 Jul 2020
Example
enum class Singleton {
INSTANCES;
}
Singleton.INSTANCES.myFunction()
Here is the best way to create a singleton class in Kotlin:
enum class Singleton {
INSTANCES;
}
Singleton.INSTANCES.myFunction()