Programming Tutorials Browser Tutorials Articles Struts Tutorials Hibernate Tutorials

  Tutorial: Iterators

The List and Set collections provide iterators.

Tutorial Details:

The List and Set collections provide iterators, which are objects that allow going over all the elements of a collection in sequence. The java.util.Iterator interface provides for one-way traversal and java.util.ListIterator provides two-way traversal. Iterator is a replacement for the older Enumeration class which was used before collections were added to Java.

Creating an Iterator
Iterators are created by calling the iterator() or listIterator() method of a List, Set, or other data collection with iterators.


 

Rate Tutorial:
http://www.roseindia.net/java/java-tips/data/collections/iterators.shtml

Read Tutorial at: Click here to view the tutorial

Rate Tutorial:
Iterators

View Tutorial:
Iterators

Related Tutorials:

The battle of the container frameworks: which should you use? - JavaWorld - January 1999
The battle of the container frameworks: which should you use? - JavaWorld - January 1999
 
Optimize a query on a Map - JavaWorld November 2000
Optimize a query on a Map - JavaWorld November 2000
 
Breathe intelligence into Java - JavaWorld April 2001
Breathe intelligence into Java - JavaWorld April 2001
 
replacing implementation inheritance by contract inheritance
replacing implementation inheritance by contract inheritance
 
alt.lang.jre: Take a shine to JRuby
JRuby combines the object-oriented strength of Smalltalk, the expressiveness of Perl, and the flexibility of the Java class libraries into a single, efficient rapid development framework for the Java platform. In this third installment in the alt.lang.jre
 
Practically Groovy: JDBC programming with Groovy
Take your practical knowledge of Groovy one step further this month, as Andrew Glover shows you how to use GroovySql to build a simple data-reporting application. GroovySql combines closures and iterators to ease Java Database Connectivity (JDBC) programm
 
Site navigation
 

 

Send your comments, Suggestions or Queries regarding this site at roseindia_net@yahoo.com.

Copyright © 2006. All rights reserved.