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 free PDF download, you will learn how to work with lists, sets, maps and other collections.
- 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 implementations. A LinkedHashMap retains insertion order.
- The Collection interface and Collections class provide many useful algorithms: set operations, searching, sorting, shuffling and more.
- Views provide access to data stored elsewhere using the standard collection interfaces.
To continue reading this article register now