C H A P T E R 5
this purpose, they are not always a good choice. For example, arrays have fixed sizes,
mapping arbitrary objects to other objects.
Java's standard class library provides the Collections Framework and legacy APIs to
managecollectionsonbehalfofapplications. Chapter5 firstpresentsthisframework,and
then introduces you to these legacy APIs (in case you encounter them in legacy code).
focuses on creating special-purpose collections APIs.
Note Java's concurrency utilities (discussed in Chapter 6 ) extend the Collections
The Collections Framework
The Collections Framework isastandardarchitectureforrepresentingandmanipulating
collections, which are groups of objects stored in instances of classes designed for this
ducesyoutothevarioustypes(mainlylocatedinthe java.util package)thatcontrib-
ute to this architecture.
The Collection Framework's architecture is divided into three sections:
• Core interfaces : The framework provides core interfaces for manipulating col-
lections independently of their implementations.