JAVA设计模式之单例模式(双重锁定)

public class SingleInstance { static volatile SingleInstance defaultInstance; public static SingleInstance getDefault() { if (defaultInstance == null) { synchronized (Sin
相关文章
相关标签/搜索