Avoiding ConcurrentModificationException
The ConcurrentModificationException is a RuntimeException that is thrown by certain Java Collections classes when an attempt is made to modify the collection while it is being iterated over. This can occur when multiple threads are accessing the same collection concurrently, and one thread modifies the collection while another thread is iterating over it.