标签:singleton highlight == 模式 单例模式 blog ret get class
package singleton; /** * 单例模式 * @author pengYi * */ public class Singleton { private static Singleton instance = null; private Singleton(){} public static Singleton getSingletonInstance(){ if (instance == null) { instance = new Singleton(); return instance; } else { return instance; } } }
标签:singleton highlight == 模式 单例模式 blog ret get class
原文地址:http://www.cnblogs.com/py1994/p/6923303.html