# Class ConcurrentModificationException

java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
java.util.ConcurrentModificationException

public class ConcurrentModificationException extends RuntimeException
An `ConcurrentModificationException` is thrown when a Collection is modified and an existing iterator on the Collection is used to modify the Collection as well.

See Also:
  - `RuntimeException`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `ConcurrentModificationException()`
  Constructs a new `ConcurrentModificationException` with the current stack trace filled in.
  `ConcurrentModificationException(String detailMessage)`
  Constructs a new `ConcurrentModificationException` with the current stack trace and message filled in.

- ## Method Summary

  ### Methods inherited from class Throwable

  `addSuppressed, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, setStackTrace, toString`

  ### Methods inherited from class Object

  `clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- ## Constructor Details

  - ### ConcurrentModificationException

    public ConcurrentModificationException()
    Constructs a new `ConcurrentModificationException` with the current stack trace filled in.

  - ### ConcurrentModificationException

    public ConcurrentModificationException(String detailMessage)
    Constructs a new `ConcurrentModificationException` with the current stack trace and message filled in.
    Parameters:
      `detailMessage` - the detail message for the exception.