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
What is a byte string?
What is "this" keyword in java? Explain
How do you check if an arraylist is not empty?
What is a “stateless” protocol ?
What does || mean in code?
What is the argument in java?
When can we say that threads are not lightweight process in java?
Explain the usage of this with constructors?
How do I get a substring?
Break statement can be used as labels in java?
What is nan in java?
How to obtain a performance profile of java program
What is difference between path and classpath?
What does this mean java?
Write a program to print fibonacci series