InterviewSolution
| 1. |
What Do You Mean By Iterator Fail-fast Property? |
|
Answer» The Iterator fail-fast property test for any modification in the structure of the UNDERLYING collection EVERY time we TRY to get the NEXT element. If there are any modifications FOUND, by CocurrentModificationException. The complete implementations of Iterator in Collection classes fail-fast by make except the concurrent collection classes such as ConcurrentHashMap and CopyOnWriteArrayList. The Iterator fail-fast property test for any modification in the structure of the underlying collection every time we try to get the next element. If there are any modifications found, by CocurrentModificationException. The complete implementations of Iterator in Collection classes fail-fast by make except the concurrent collection classes such as ConcurrentHashMap and CopyOnWriteArrayList. |
|