The Collection Framework

The Collection Framework is intended as a major enhancement over prior support for collections, which was fairly minimal. Previously Java had only Vector, Hashtable, and Enumeration, as well as arrays, for collections. This was not sufficient for many programs, and developers needed to either purchase third-party classes or write their own. The Java Collection Framework addresses the lack of a robust set of collection classes. Support has been added for multiple types of bags and sets. Java's Enumeration mechanism has been superseded by an Iterator.

The Collection Framework consists of two parts: interfaces and implementations. The purpose of this distinction is that a set, for example, may be implemented in different ...

Get PURE Java™ 2 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.