|
Iterator
Hi,
First of all, Iterator is a java interface and it has methods to iterate on elements of collections.
Un can create your own iterator implementing that interface:
The methods of the interface are:
hasNext() : To know if there other elements left in the collection.
next() : Returns the next element.
remove() : To remove the current element from the collection(better not use that metthod).
U can read more about the Iterator in the java doc.
Bye.
|