Chapter 7

Collections

Many data structures have been developed so programmers can store and retrieve values efficiently. The Java API provides implementations of common data structures and algorithms, as well as a framework to organize them. In this chapter, you will learn how to work with lists, sets, maps, and other collections.

The key points of this chapter are:

  1. The Collection interface provides common methods for all collections, except for maps which are described by the Map interface.

  2. A list is a sequential collection in which each element has an integer index.

  3. A set is optimized for efficient ...

Get Core Java for the Impatient, 3rd 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.