Contents Next: Lists

What are collections?

The Java Collections Framework provides interfaces and implementations for some very fundamental data structures that can be used in many situations.

The most important interfaces available are: (all contained in the package java.util)

Implementations

The framework comes with multiple implementations for each of the core interfaces. For example the List interface is implemented by the ArrayList and the LinkedList classes and the Set interface is implemented by the HashSet and the TreeSet classes.

Other collection libraries

For example Guava offers these additional interfaces:

Contents Next: Lists