16.2 Collections Overview

A collection is a data structure—actually, an object—that can hold references to other objects. Usually, collections contain references to objects of any type that has the is-a relationship with the type stored in the collection. The collections-framework interfaces declare the operations to be performed generically on various types of collections. Figure 16.1 lists some of the collections framework interfaces. Several implementations of these interfaces are provided within the framework. You may also provide your own implementations.

Image

Fig. 16.1 | Some collections-framework interfaces.

Get Java™ How To Program (Early Objects), Tenth 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.