November 2024
Intermediate to advanced
499 pages
12h 13m
English
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:
The Collection interface provides common methods for all collections, except for maps which are described by the Map interface.
A list is a sequential collection in which each element has an integer index.
A set is optimized for efficient containment testing. Java provides HashSet and TreeSet implementations.
For maps, you have the choice between HashMap and TreeMap
Read now
Unlock full access