摘要: 一、概念 JVM中,单例对象只有一个实例存在。 二、饿汉式实现 public class Singleton { private static Singleton instance = new Singleton(); private Singleton() { } public static Si 阅读全文
posted @ 2020-07-23 23:32 Mr靖哥哥 阅读(126) 评论(0) 推荐(0) 编辑