I have this singleton class
public final class MySingleton{
public static MySingleton singletonInstance;
private MySingleton(){}
static{
singletonInstance=new MySingleton();
}
public static MySingleton getInstance(){
return singletonInstance;
}
}
I wanted to know is there any other simpler and better way of creating a singleton instance?