#1: ConcurrentModificationException Getting a ConcurrentModificationException when trying to modify (i.e. adding or removing an item) a collection while iterating. The following code throws a ConcurrentModificationException.
1 2 3 4 5 6 7 |
List<T> list = getListOfItems(); for (Iterator<T> iter = list. |