An Interface is like a contract, it guarantees the preconditions required to produce the desired postconditions.

Comparable Interface

Iterator Interface

Return Method Description
boolean hasNext() Returns true if iterations has more elements.
E next() Returns the next element in the iteration.
void remove() Removes last element returned by iterator.