摘要: 分为饿汉模式及懒汉模式 饿汉模式是初始化时创建。 懒汉模式是使用时创建。 饿汉模式: public class Student1 { // 2:成员变量初始化本身对象 private static Student1 student = new Student1(); // 1:构造私有 privat 阅读全文
posted @ 2020-04-22 08:08 HarkLee 阅读(168) 评论(0) 推荐(1) 编辑