private AtomicInteger fistJobDone = new AtomicInteger(0);
时间: 2023-10-19 22:58:30 浏览: 68
Java AtomicInteger类使用方法实例讲解
引用通过构造方法直接创建。set/get方法如下。AtomicInteger atomicInteger = new AtomicInteger(); // 初始化100 AtomicInteger atomicInteger = new AtomicInteger(100); int currentValue = atomicInteger.get(); // 100 atomicInter.set(1234); // 现在值是1234 引用<em>1</em><em>2</em><em>3</em>
#### 引用[.reference_title]
- *1* [AtomicInteger的使用](https://blog.csdn.net/yyuggjggg/article/details/126432213)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT0_1"}} ] [.reference_item]
- *2* [Java进阶-AtomicInteger](https://blog.csdn.net/u011993094/article/details/116537832)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT0_1"}} ] [.reference_item]
- *3* [Java 使用AtomicInteger实现锁,即无锁编程 代码实现](https://blog.csdn.net/jiahao1186/article/details/102897565)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT0_1"}} ] [.reference_item]
[ .reference_list ]
阅读全文