public class SingletonInitiOnDemand {
private SingletonInitiOnDemand() {
};
private static class SingletonHolder {
private static final SingletonInitiOnDemand INSTANCE = new SingletonInitiOnDemand();
}
public static SingletonInitiOnDemand getInstance() {
return SingletonHolder.INSTANCE;
}
}
欢迎光临 黑马程序员技术交流社区 (http://bbs.itheima.com/) | 黑马程序员IT技术论坛 X3.2 |