You are viewing a single comment's thread. Return to all comments →
class Singleton {
public String str; private static Singleton singleton; private Singleton() {} public static Singleton getSingleInstance() { if(singleton == null) { singleton = new Singleton(); } return singleton; }
}
Java Singleton Pattern
You are viewing a single comment's thread. Return to all comments →
class Singleton {
}