会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
Loading
妖久
博客园
首页
新随笔
联系
订阅
管理
随笔分类 -
多线程
多线程下的一些注意事项,比如单例该怎么写等等
单例模式的双重检测
摘要:单例模式是设计模式中比较常见简单的一种,典型双重检测写法如下: public class SingletonClass { private volatile static SingletonClass instance = null; public static SingletonClass get
阅读全文
posted @
2018-11-28 13:47
妖久
阅读(10670)
评论(3)
推荐(0)
公告