You are viewing a single comment's thread. Return to all comments →
Was so happy about my naive approach:
class Singleton { public String str; private static Singleton singleton; private Singleton() {} public static getSingleInstance() { if(singleton == null) { singleton = new Singleton(); } return singleton; } }
came here and learned something useful and new. Thanks a ton man.
Seems like cookies are disabled on this browser, please enable them to open this website
Java Singleton Pattern
You are viewing a single comment's thread. Return to all comments →
Was so happy about my naive approach:
came here and learned something useful and new. Thanks a ton man.