- 博客(3)
- 收藏
- 关注
原创 CountDownLatch和ExecutorService结合使用案例
4个人一起打麻将,人到齐了再开始,用CountDownLatch来控制public class TestCountDownLatch2 { private static AtomicInteger id = new AtomicInteger(); private static ExecutorService executorService = new ThreadPoolE...
2019-04-23 20:21:40 1787
转载 SimpleDateFormat线程不安全问题
转自:http://www.cnblogs.com/peida/archive/2013/05/31/3070790.html 想必大家对SimpleDateFormat并不陌生。SimpleDateFormat 是 Java 中一个非常常用的类,该类用来对日期字符串进行解析和格式化输出,但如果使用不小心会导致非常微妙和难以调试的问题,因为 DateFormat 和 SimpleDateFor...
2019-04-21 19:07:59 217
转载 Item18:组合优于继承
转自:https://blog.csdn.net/qq_20492999/article/details/80816922#commentBox
2019-04-21 11:48:05 153
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人