You are viewing a single comment's thread. Return to all comments →
Here is what I tested:
class Singleton{ public static String str; private Singleton() {} private static class SingletonHolder { private static final Singleton INSTANCE = new Singleton(); } public static Singleton getSingleInstance() { return SingletonHolder.INSTANCE; } }
Java Singleton Pattern
You are viewing a single comment's thread. Return to all comments →
Here is what I tested: