Reputation: 741
CopyOnWriteArrayList produce fail-safe iterator because everytime the "structure is modified" , the modification mean a new array is produced. the iterator iterate over the old copy of array? So, fail-safe mean it is safe from failing?
Upvotes: 0
Views: 144
Reputation: 5250
Read this post for better explanation http://www.journaldev.com/378/how-to-avoid-concurrentmodificationexception-when-using-an-iterator
Upvotes: 0
Reputation: 28747
see comparision and explanation at http://www.certpal.com/blogs/2009/09/iterators-fail-fast-vs-fail-safe/
Upvotes: 1