aspose file tools*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Iterator in lists Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Iterator in lists" Watch "Iterator in lists" New topic
Author

Iterator in lists

Mohit G Gupta
Ranch Hand

Joined: May 18, 2010
Posts: 634

Iterator<Dog> i3 = d.iterator();

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

Dog is a class.

what does d.iterator do ?


OCPJP 6.0 93%
OCPJWCD 5.0 98%
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14688
    
  16

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.


[My Blog]
All roads lead to JavaRanch
 
Consider Paul's rocket mass heater.
 
subject: Iterator in lists