Iterator in the HashMap is fail-safe means what?
Answer Posted / amol
The iterators for the concrete collection implementations
are fail-fast.
That means that if you are using an Iterator to traverse a
collection while underlying collection is being modified by
another thread, then the Iterator fails immediately by
throwing a ConcurrentModificationException (another
RuntimeException). That means the next time an Iterator
method is called, and the underlying collection has been
modified, the ConcurrentModificationException exception gets
thrown.
Is This Answer Correct ? | 59 Yes | 2 No |
Post New Answer View All Answers
How many bits is a boolean?
What is main method?
What is a nested structure?
Can we nested try statements in java?
What are static blocks and static initalizers in java ?
What is boolean example?
How garbage collection is done in java?
What is java in detail?
How many java versions are there?
Difference between a class and an object?
What is java and its types?
Can a abstract class be declared final?
How to pass arraylist to stored procedure in java?
Differentiate jar and war files?
What about features of local inner class?