Java 单例模式实现代码示例
public class Singleton { private static Singleton instance; private Singleton() {} public static Singleton getInstance() { if (instance == null) { instance = new Singleton(); } return instance; } }
原文地址: https://www.cveoy.top/t/topic/mxZA 著作权归作者所有。请勿转载和采集!