package com.Isay.learn;
/**
* @author isay_me
* @date 2019/10/22
* @time 11:32
* @target:
*/
public class Singleton {
private static Singleton instance;
private Singleton(){}
public static Singleton getInstance(){
if (instance == null){
synchronized (Singleton.class){
if (instance == null){
instance = new Singleton();
}
}
}
return instance;
}
}