ConcurrentModificationException
The exception an iterator throws when its collection was changed by something other than the iterator.
Thrown by fail-fast iterators of ArrayList, HashMap and others when the modification count changed; a single thread causes it by changing a collection inside its own for-each.
Examples
for (String s : list) list.remove(s);throws it on the next step.
See also