You are viewing a single comment's thread. Return to all comments →
Mine
class Singleton{ public String str; private static Singleton instance = null; private Singleton(){ } public static Singleton getSingleInstance(){ if (instance==null) instance = new Singleton(); return instance; } }
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 →
Mine