标签:
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/Defry/p/4582849.html