16.1 Introduction

In Section 7.16, we introduced the generic ArrayList collection—a dynamically resizable array-like data structure that stores references to objects of a type that you specify when you create the ArrayList. In this chapter, we continue our discussion of the Java collections framework, which contains many other prebuilt generic data-structures.

Some examples of collections are your favorite songs stored on your smartphone or media player, your contacts list, the cards you hold in a card game, the members of your favorite sports team and the courses you take at school.

We discuss the collections-framework interfaces that declare the capabilities of each collection type, various classes that implement these interfaces, methods ...

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.