What happens if you modify a collection directly while iterating over it using a normal Iterator?

Last Updated :
Discuss
Comments

What happens if you modify a collection directly while iterating over it using a normal Iterator?

It updates automatically

Throws ConcurrentModificationException

Skips modified elements

The iterator restarts

Share your thoughts in the comments