ConcurrentModificationException
This lesson explains why ConcurrentModificationExceptions occurs and how it can be avoided.
We'll cover the following...
If you are interviewing, consider buying our number#1 course for Java Multithreading Interviews.
Single Thread Environment
The name ConcurrentModificationException
may sound related to concurrency, however, the exception can be thrown while a single thread operates on a map. In fact, ConcurrentModificationException
isn’t even part of the java.util.concurrent
package. The exception occurs when a map is modified at the same time (concurrently) any of its collection views (keys, values or entry pairs) is ...