为什么这个模式被认为是有问题的?在我看来,它很好啊?你有什么想法吗?
public static Singleton getInst() {
if (instace == null) createInst();
return instace;
}
private static synchronized createInst() {
if (instace == null) {
instace = new Singleton();
}
}