JAVA設計模式之單例模式(雙重鎖定)

public class SingleInstance { static volatile SingleInstance defaultInstance; public static SingleInstance getDefault() { if (defaultInstance == null) { synchronized (Sin
相關文章
相關標籤/搜索