标签:final tin turn single 单例 pre 代码实现 vat on()
代码实现如下:public class Singleton{
private Singleton(){
}
public static Singleton getInstance(){
return SingletonHolder.sInstance;
}
private static class SingletonHolder(
private static final Singleton sInstance = new Singleton();
}
}
标签:final tin turn single 单例 pre 代码实现 vat on()
原文地址:https://blog.51cto.com/williamnw/2540404