[Java] 纯文本查看 复制代码 public class SingletonInitiOnDemand {
private SingletonInitiOnDemand() {
};
private static class SingletonHolder {
private static final SingletonInitiOnDemand INSTANCE = new SingletonInitiOnDemand();
}
public static SingletonInitiOnDemand getInstance() {
return SingletonHolder.INSTANCE;
}
} |