Fail Fast Iterator
|
Fail Safe Iterator
|
Does not allow modification of a collection while iterating over it
|
allows
|
Throws ConcurrentModificationException if modified
|
No exception on modification while iterating
|
Ex. Iterators returned by ArrayList,HashMap, Vector
|
Ex. Iterator returned by ConcurrentHashMap, CopyOnWriteArrayList
|
Traverse on original collection
|
Traverse on the copy of the original collection
|
Requires extra memory to clone the collection
|
Post a Comment