Chapter 6: Data Structures, Generics, and Popular Utilities
This chapter presents the Java collections framework and its three main interfaces, List
, Set
, and Map
, including a discussion and demonstration of generics. The equals()
and hashCode()
methods are also discussed in the context of Java collections. Utility classes for managing arrays, objects, and time/date values have corresponding dedicated sections too. After studying this chapter, you will be able to use all the main data structures in your programs.
The following topics will be covered in this chapter:
List
,Set
, andMap
interfacesCollections
utilitiesArrays
utilitiesObject
utilities- The
java.time
package
Let’s begin!