Capgemini Engineering Interview Question

Difference between iterator and for each loop and in what condition do we use them?

Interview Answer

Anonymous

Jun 22, 2012

I think only difference between them is that using iterator we can go both back and forth in a collection which is not possible using for-each loop.