标签:
1 public class Singleton { 2 3 private static Singleton singleton ; 4 5 private Singleton(){} 6 7 public static Singleton getInstance(){ 8 9 if(singleton == null){ 10 11 singleton = new Singleton(); 12 13 } 14 return singleton; 15 } 16 }
标签:
原文地址:http://www.cnblogs.com/mybatis/p/5896165.html