会员
周边
捐助
新闻
博问
闪存
赞助商
所有博客
当前博客
我的博客
我的园子
账号设置
简洁模式
...
退出登录
注册
登录
Yan_Yang
博客园
首页
新随笔
联系
管理
订阅
2021年5月24日
单例模式的5种实现方式(懒汉模式、饿汉模式、双重锁模式、静态内部类模式、枚举模式)
摘要: 单例模式 学习内容:一、概念二、单例模式写法2.1 饿汉式2.2 懒汉式2.3 双重加锁机制2.4 静态内部类2.5 枚举 Enum 三、小结 总结: 参考文章: 【1】http://wuchong.me/blog/2014/08/28/how-to-correctly-write-singleto
阅读全文
posted @ 2021-05-24 21:38 Yan_Yang
阅读(372)
评论(0)
推荐(0)
编辑
公告