摘要: Future And Callable 引用 Future用于返回任务,带有返回值 Callable和Runnable 的区别 Runnable是在JDK1.0版本引入的,唯一的一个方法是 。多插入一句,JDK设计者设计的类是真的强从1.0用到现在还在用 Callable是在JDK1.5版本引入的, 阅读全文
posted @ 2019-04-19 16:59 随风而行- 阅读(368) 评论(0) 推荐(0) 编辑
摘要: AtomicInteger AtomicInteger类的理解与使用 首先看两段代码,一段是Integer的,一段是AtomicInteger的,为以下: 1 2 3 4 5 6 7 8 9 AtomicInteger介绍 AtomicInteger 是一个提供原子操作的 Integer 类,通过线 阅读全文
posted @ 2019-04-19 09:56 随风而行- 阅读(133) 评论(0) 推荐(0) 编辑