摘要: 首先来看一个问题: 下面这个方法是线程安全的吗?如何才能让这个方法变成线程安全的? public class MyCount { private static int counter = 0; public static int getCount(){ return counter++; } } 首 阅读全文
posted @ 2020-08-24 20:41 程序零世界 阅读(388) 评论(1) 推荐(0) 编辑