Chapter 2: Collections

Java collection library separates interfaces and implementations.
The fundamental interface for collection classes in the Java library is the Collection interface.
public interface Collection { boolean add(E element); Iterator iterator(); . . . }
The add method returns true if adding the object actually changed the collection.
The iterator method returns an object that implements the Iterator interface.