单例设计模式详解 单例设计模式要点:常见的几种形式:1.直接实例化饿汉式public class Singleton1 { public static final Singleton1 INSTANCE = new Singleton1(); private Singleton1(){ }}2.枚举式public enum Singleton2 { INSTANCE}3.静态代... 面试学习 2023-10-28 41 点赞 0 评论 62 浏览