I just wanted to know what is the main advantage of using the iterators over the array indices. I have googled but i am not getting the right answer.
You can abstract the collection implementation away.