Capgemini Interview Question

Fail Fast vs Fail Safe

Interview Answer

Anonymous

Jun 26, 2020

While iterating any collection or map, if iterator throw concurrentModificationException because some process was trying the modifying the collection or map that iterators we called as fail-fast. On the other hand, if they do not throw the exception, those iterator called as fail-safe (Iterator of thread safe classes)