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 collection’s element type. 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.

Fig. 16.1

Interface Description
Collection The root interface in the collections hierarchy from which interfaces Set, Queue and List are derived.
Set A collection that does not contain ...

Get Java How to Program, Early Objects, 11th 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.