Tuesday, October 27, 2015

How to avoid ConcurrentModificationException while iterating a collection?


We can use concurrent collection classes to avoid ConcurrentModificationException while iterating over a collection, for example CopyOnWriteArrayList instead of ArrayList.

No comments:

Post a Comment