摘要: 转载出处:http://cantellow.iteye.com/blog/838473第一种(懒汉,线程不安全): 1 public class Singleton { 2 private static Singleton instance; 3 private Singleton (){} 4 5 public static Singleton getInstance() { 6 if (instance == null) { 7 instance = new Singleton(); 8 } 9 ... 阅读全文
posted @ 2012-01-08 14:06 huangzy 阅读(199) 评论(0) 推荐(0) 编辑