会员
周边
捐助
新闻
博问
闪存
赞助商
所有博客
当前博客
我的博客
我的园子
账号设置
简洁模式
...
退出登录
注册
登录
程序零世界
关注公众号:程序零世界 获取更多Java文章以及Java学习资料 每周日可领取女盆友一枚
博客园
首页
新随笔
联系
订阅
管理
2020年8月
怎么样创建的线程才是安全的呢?带着疑问看文章
摘要: 首先来看一个问题: 下面这个方法是线程安全的吗?如何才能让这个方法变成线程安全的? public class MyCount { private static int counter = 0; public static int getCount(){ return counter++; } } 首
阅读全文
posted @ 2020-08-24 20:41 程序零世界
阅读(388)
评论(1)
推荐(0)
编辑
公告