标签:单例 null style bsp single nbsp span vat ola
package javalearn; public class SingleInstance { private volatile static SingleInstance instance; private SingleInstance(){ } public static SingleInstance getInstance(){ if (instance==null){ synchronized(SingleInstance.class){ if (instance==null){ instance = new SingleInstance(); } } } return instance; } }
标签:单例 null style bsp single nbsp span vat ola
原文地址:https://www.cnblogs.com/zheng123/p/11187988.html