1//Occurs when trying to remove an element from a Collection
2//while iterating over it
3
4//Where removal takes place
5//Setup an iterator
6Iterator<Thing> iter = things.iterator();
7//Iterate over collection
8while(iter.hasNext()) {
9 Thing thing = iter.next();
10 if (/* Some Condition that initiates removal */) {
11 //Remove using iterator
12 iter.remove();
13 }
14}
15//Avoids ConcurrentModificationException