懒汉单例模式创新,懒汉模式创新,/** * 懒汉单例模
分享于 点击 34206 次 点评:19
懒汉单例模式创新,懒汉模式创新,/** * 懒汉单例模
/** * 懒汉单例模式创新(线程安全) * 只有在调用的时候才会初始化 */public class LazySuperSingleton { static class SingletonHolder { static LazySuperSingleton instance = new LazySuperSingleton(); } public static LazySuperSingleton getInstance() { return SingletonHolder.instance; }}//该片段来自于http://byrx.net
用户点评