This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
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
 
Have you checked out Aspose?
 
subject: Iterator in lists
 
It's not a secret anymore!