Logo 
Search:

Java Answers

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds
  Question Asked By: John Cooper   on Aug 21 In Java Category.

  
Question Answered By: Norman Ray   on Aug 21

I see a couple of reasons for using Iterators instead of for loops:

1.) Iterators handle most looping  cases more cleanly than for loops
2.) Iterator interface  can hide potentially complicated iteration logic

Share: 

 
 
Didn't find what you were looking for? Find more on Enumeration/Iterator Or get search suggestion and latest updates.