摘要:
1、ArrayList /** * 集合类不安全问题 * 1、故障现象: * java.util.ConcurrentModificationException(并发修改异常) * 2、解决方案 * 3.1、new Vector<>(); * 3.2、Collections.synchronized 阅读全文
posted @ 2021-02-26 16:27
DHaiLin
阅读(96)
评论(0)
推荐(0)
摘要:
1、CAS: > compareAndSet(期望值,修改值) 比较并交换; /** * CAS: > compareAndSet() * 比较并交换 */ public class CASDemo { public static void main(String[] args) { AtomicI 阅读全文
posted @ 2021-02-26 13:58
DHaiLin
阅读(118)
评论(0)
推荐(0)

浙公网安备 33010602011771号