© 1999-2048 dssz.net 粤ICP备11031372号
[其它] Java:单例模式的七种写法
说明:第一种(懒汉,线程不安全): 1 public class Singleton { 2 private static Singleton instance; 3 private Singleton (){} 4 public static Singleton getInstance() { 5 if (instance == null) { 6 instance = new Sin<weixin_38653687> 上传 | 大小:67kb