 | | wallacedong V2EX member #118716, joined on 2015-05-25 15:59:32 +08:00 |
wallacedong's recent replies
你这个阶段只能硬着头皮干,坚持一段时间就知道自己适不适合做开发,有些人想做开发,但是一段时间下来自己觉得不合适,别人也觉得不合适,那就没必要继续了,这都是身边真实发生的事,有些人虽然基础差点,但是肯学习,有一些悟性,坚持一段时间之后就得心应手了,所以你最好别辞职,公司也不会随便让你走,你这是自己坚持不下来,怨不得别人。
public class Singleton {
// Private constructor prevents instantiation from other classes
private Singleton() { }
/**
* SingletonHolder is loaded on the first execution of Singleton.getInstance()
* or the first access to SingletonHolder.INSTANCE, not before.
*/
private static class SingletonHolder {
public static final Singleton INSTANCE = new Singleton();
}
public static Singleton getInstance() {
return SingletonHolder.INSTANCE;
}
}