You can’t traverse through the list using Iterator and modify the list with List-level add/remove methods at the same time.
To add an element in such situations you can use ListIterator and its method add.
3
solved Getting ConcurrentException when working with list [duplicate]