摘要: /** * 单例模式 将构造函数私有化 在类的内部创建实例 提供获取唯一实例的方法 */ // 创建想要实现单例设计的Java类,如下: public class SingletonModel { private SingletonModel(){ System.out.println("model 阅读全文
posted @ 2021-01-11 21:14 钟子期 阅读(146) 评论(0) 推荐(0)