你可以自己检查一下实现情况。让我们考虑ArrayList一个例子。它有一个内部Itr类,该iterator()方法返回该内部类的实例。该类Itr有一个expectedModCount计数器,它是用封闭的ArrayList's初始化的modCount:private class Itr implements Iterator<E> { int cursor; // index of next element to return int lastRet = -1; // index of last element returned; -1 if no such int expectedModCount = modCount; ...}当您调用 的方法Iterator(例如next()或 )时remove(),它会调用该checkForComodification()方法: final void checkForComodification() { if (modCount != expectedModCount) throw new ConcurrentModificationException(); }如果自创建实例以来ArrayList'modCount已递增,则会引发异常。Iterator