Fail-fast
Iterators fail as soon as they realized that structure of Collection
has been modified at any time after the iterator is created, in any
way except through the iterator's own remove or add methods, the
iterator will throw a ConcurrentModificationException.
Fail-safe
iterator doesn't throw any Exception if Collection is modified
structurally
while
one thread is Iterating over it because they work on clone of
Collection instead of original collection.
Related
Links
No comments:
Post a Comment