public class SuperSingleton {
* 简单浅显易懂的单例方式,JVM实现了线程安全,同时实现了懒加载,the final solution!
*/
private static class SingleData {
public static SuperSingleton singleton = new SuperSingleton();
}
private SuperSingleton() {
}
public static SuperSingleton Instance() {
return SingleData.singleton;
}
}