Name
ConcurrentModificationException
Synopsis
Signals
that a modification has been made to a data structure at the same
time some other operation is in progress and that, as a result, the
correctness of the ongoing operation cannot be guaranteed. It is
typically thrown by an Iterator
or
ListIterator
object to stop an iteration if it
detects that the underlying collection has been modified while the
iteration is in progress.
Figure 16-11. java.util.ConcurrentModificationException
public class ConcurrentModificationException extends RuntimeException { // Public Constructors public ConcurrentModificationException( ); public ConcurrentModificationException(String message); }
Get Java in a Nutshell, 5th Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.