public class Demo {
private Demo demo = null;
//空参构造
public Demo(){
}
//单例
public static Demo getInstance(Demo demo){
if(demo == null){
synchronized (demo) {
demo = new Demo();
}
}
return demo;
}
}