摘要: 单例应该是最简单的设计模式,下面是几种不同的写法: 1.线程安全的懒汉 2.饿汉模式 3.枚举 4.静态内部类 5.双重校验锁 阅读全文
posted @ 2018-03-24 20:19 SleepyDot 阅读(101) 评论(0) 推荐(0) 编辑