Search Interview Questions
| 3356 questions in repository.|
There are more than 200 unanswered questions.
Click here and help us by providing the answer.
Have a video suggestion.
Click Correct / Improve and please let us know.
|Java - Interview Questions and Answers|
|Ans. Iterators in java are used to iterate over the Collection objects. |
Fail-Fast iterators immediately throw ConcurrentModificationException if there is any addition, removal or updation of any element.
Fail-Safe iterators don't throw any exception if a collection is structurally modified while iterating over it. This is because, they operate on the clone of the collection and not on the original collection.
|Help us improve. Please let us know the company, where you were asked this question :|
|Like Discuss Correct / Improve  ail fast   fail saf Asked in 8 Companies intermediate|
|What are the fail fast systems ?|
|Why iterators of an array list are fail fast ?|
|Why Concurrent Collection Classes are fail-fast in Java ?|