Fail-Safe,Fail-Fast Iterators in Java and ConcurrentModificationException

In this article ,I would try to explain FAIL-FAST and FAIL-SAFE behavior of iterators.

Let us first try to understand what is Iterator?





Iterator is an interface defined in java.util package,with following methods declared in it :

boolean hasNext();
E next();
void remove();

ArrayList Read Operations explored

Hello Friends,

In this article,we will see all the read operations which can be performed on one of the very commonly used collection i.e. ArrayList.If you want to see all the write operations which can be performed on an ArrayList,you can go through my previous article ArrayList Write operations explored.