Iterator in the HashMap is fail-safe means what?
Answer Posted / namy
Fail-safe is relevant from the context of iterators. If an iterator has been created on a collection object and some other thread tries to modify the collection object "structurally”, a concurrent modification exception will be thrown. It is possible for other threads though to invoke "set" method since it doesn’t modify the collection "structurally”. However, if prior to calling "set", the collection has been modified structurally, "IllegalArgumentException" will be thrown.
| Is This Answer Correct ? | 19 Yes | 2 No |
Post New Answer View All Answers
What happens when a thrown exception is not handled?
What is this keyword in java?
What is multithreading in java?
What is meant by method?
How do you find the absolute value?
What do you understand by synchronization?
explain multi-threading in java?
What is the final class?
Difference between vector and arraylist.
List down the methods and interfaces of collection class in java.
Why is java architectural neutral?
How to convert string to byte array and vice versa?
What are user defined exceptions?
What is rmi and steps involved in developing an rmi object?
Can we sort a map in java?