标签:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
public class SingletonClass{ private static SingletonClass instance= null ; public static SingletonClass getInstance(){ if (instance== null ){ synchronized (SingletonClass. class ){ if (instance== null ){ instance= new SingletonClass(); } } } return instance; } private SingletonClass(){} } |
标签:
原文地址:http://www.cnblogs.com/java-lzm/p/4375238.html