What is fail-fast iterators ?
Can anybody please clarify what does it exactly mean by fail-fast iterator. I had even gone through the entire API which says about this . but coudn't make it out
Can anybody please clarify what does it exactly mean by fail-fast iterator. I had even gone through the entire API which says about this . but coudn't make it out
http://java.sun.com/j2se/1.5.0/docs/guide/collections/overview.html
It's an iterator that will throw an exception if something else tries to edit the collection it's iterating through. Namely a concurrentModificationException. This is a good thing because it will mess up a lot worse, later, if this type of thing isn't picked up. Hope that helps.