2021-11-22发表2021-11-22更新Professional / Java / Java集合1 分钟读完 (大约125个字)checkForComodification123456789101112//执行这段代码是会抛出异常 ConcurrentModificationExceptionfor (String str : list) { if ("remove".equals(str)) { list.remove(str); }}//具体位置final void checkForComodification() { if (modCount != expectedModCount) throw new ConcurrentModificationException(); }阅读更多
2021-11-22Collections. SynchronizedList ()、CopyOnWriteArrayList 与 Vector 有什么区别?Professional / Java / Java集合