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