You are viewing a single comment's thread. Return to all comments →
import java.io.; import java.util.; import java.text.; import java.math.; import java.util.regex.; import java.lang.reflect.;
class Singleton { private static Singleton instance; public static String str; private Singleton() {}
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 →
import java.io.; import java.util.; import java.text.; import java.math.; import java.util.regex.; import java.lang.reflect.;
class Singleton { private static Singleton instance; public static String str; private Singleton() {}
}