/** An object that delivers each item in some collection of items* each of which is a T. */
publicinterfaceIterator<T>{
/** True iff there are more items to deliver. */
booleanhasNext();
/** Advance THIS to the next item and return it. */
Tnext();
/** Remove the last item delivered by next() from the collection* being iterated over. Optional operation: may throw* UnsupportedOperationException if removal is not possible. */