Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

What is an Iterator?

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Hi ,, I'm a real newbie,, and have but a slight idea of what an iterator is..

From what I understand its supposed to count the number of elements in an array implicitly..?? is this right?
Probably not,, so please help!!

THANK U!!
 
An iterator is a object that 'walks' a list of items. Typically we use iterators to provide convenient and effecient processing of items in a List (rather than manually iterating the list using repeated get(i) calls. Iterators can be more effecient than doing this as well, especially in the case of LinkedList. Iterators are typically used with Collections. See the java tutorial on Collections for more info
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top