public class MySingleton implements Cloneable{
private static MySingleton mySingleton = new MySingleton();
private MySingleton(){}
public static MySingleton getInstance(){
return mySingleton;
}
@Override
protected Object clone() throws CloneNotSupportedException {
return mySingleton;
}
}