The java implementationof iterator pattern allows user to traverse carious types of data sets without worrying about the underlying implementation of collection. Since clients simply interact with the iterator for themselves. Some will allow full access to the underlying data sets while others may restrict certain functionalities, such as removing items.
---- "Design patterns" by Jason McDonald
For example, just open src.zip in your JAVA_HOME or whait a few ours till I found my old examples
posted 11 years ago
Here is example:
And tomorrow is the circus! We can go to the circus! I love the circus! We can take this tiny ad: