Difference between fail-safe and fail-fast Iterator is becoming favorite core java interview questions day by day, reason
it touches concurrency a bit and interviewee can go deep on it to ask how fail-safe or fail-fast behavior is implemented.
In this article article we will see what is fail-safe and fail fast iterators in java and differences between fail-fast and fail-safe iterators . Concept of fail-safe iterator are relatively new in Java and first introduced with Concurrent Collections in Java 5 like ConcurrentHashMap and CopyOnWriteArrayList.