Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

A Tale of Two Iterators

When you look at the most popular Java interview questions, you might encounter the one about fail-fast and fail-safe iterators: What’s the difference between fail-fast and fail-safe iterators? The simplified answer is that: Fail-fast iterator throws ConcurrentModificationException if the collection is modified while iterating, but fail-safe doesn’t. Even though it totally makes sense, it’s not ...



This post first appeared on Java Code Geeks, please read the originial post: here

Share the post

A Tale of Two Iterators

×

Subscribe to Java Code Geeks

Get updates delivered right to your inbox!

Thank you for your subscription

×