众所周知,、等Iterator返回的 s是快速失败的,但在使用迭代器时不会抛出。如何?ArrayListHashMapHashSetremove()ConcurrentModificationException
ConcurrentModificationException如果在迭代集合时修改了集合,则快速失败迭代器将抛出。但是在从迭代器的 中删除元素ArrayList或HashSet使用迭代器时remove(),不会抛出任何ConcurrentModificationException. 请详细解释。
谢谢
慕后森
慕容3067478
温温酱
随时随地看视频慕课网APP
相关分类