public class Sigle {
private volatile static Sigle instance = null;
private Sigle(){
}
public static Sigle getInstance(){
if(instance == null){
synchronized (Sigle.class){
if (instance == null){
instance = new Sigle();
}
}
}
return instance;
}
}
private volatile static Sigle instance = null;
private Sigle(){
}
public static Sigle getInstance(){
if(instance == null){
synchronized (Sigle.class){
if (instance == null){
instance = new Sigle();
}
}
}
return instance;
}
}