Question d’entretien chez Capgemini Engineering

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

Réponse à la question d'entretien

Utilisateur anonyme

22 juin 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.