• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Iterator in lists

 
Mohit G Gupta
Ranch Hand
Posts: 634
Chrome Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Iterator<Dog> i3 = d.iterator();

List<Dog> d = new ArrayList<Dog>();

Dog is a class.

what does d.iterator do ?
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
what does d.iterator do ?

It returns an Iterator. If you don't know what an Iterator is, check the API of java.util.Iterator.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic