The Collections Framework

A significant design change introduced in the Java 1.2 API and updated somewhat in the Java 1.3 release relates to how collections of objects are created and manipulated. Earlier versions of the language provided the Vector, Hashtable, and Stack classes for limited collection functionality, but Java 1.2 increased this support dramatically. Collections are now supported by a number of interfaces and classes in the java.util package known as the Java collections framework.

A collection is nothing more than a type of data structure, which refers to a grouping of multiple data elements. You already saw the simplest Java collection, the array, back in Chapter 3, "Data Types and Other Tokens." Collections can vary in complexity, ...

Get Special Edition Using Java 2 Standard Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.