
Implication of second point
void IteratorPrinter(Iterator It)
{
while( It.hasNext() )
{
System.out.println(It.next());
}
}
IteratorPrinter(new
OpenListIterator(É));
IteratorPrinter(new
ArrayIterator(É));
. . .
The same
code can be used for any type of Iterator.