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 variable length arguments in java?
What are the types of methods in java?
Does java support Operator Overloading?
What is the disadvantage of java?
Can you override a final method?
What is a numeric literal?
What is comparator in java?
Discuss different types of errors that generally occur while programming.
Define nashorn in java8.
What is the difference between sop and work instruction?
Define iterator and methods in iterator?
What is a java applet? What is an interface?
What does this () mean in java?
When is the garbage collection used in Java?
Tell me the latest versions in java related areas?