摘要: 来源:http://www.cnblogs.com/whgw/archive/2011/10/05/2199535.htmlJava中单利模式有三种: 懒汉式、饿汉式、登记试饿汉式:public class Singleton { private Singleton() {} private static Singleton instance = new Singleton(); public static Singleton getInstance() { return instance; }}懒汉式:public class Singleton { ... 阅读全文
posted @ 2012-12-18 18:48 wouldguan 阅读(195) 评论(0) 推荐(0) 编辑