xxxxxxxxxx
//method should be public so you can use like this
object SampleSingleton {
fun someMethod() {
println("I love coding")
}
}
//If from Java then as follows
public static void main(String args[]) {
SampleSingleton.INSTANCE.someMethod();
}
//or from Kotlin class as follows
SampleSingleton.someMethod()