Monday, 9 September 2013

Is iterator of hashmap fail-safe?

Is iterator of hashmap fail-safe?

I was reading a properties of hashmap . And found a answer on SO having
lot of votes which says
Iterator in the HashMap is fail-safe while the enumerator for the
Hashtable is not.
http://stackoverflow.com/a/7644118/907687
While the javadoc says The iterators returned by all of this class's
"collection view methods" are fail-fast:
Actually the number of votes on that answered has confused me. Else I
think it is fail-fast only.
Can someone explain?

No comments:

Post a Comment