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, and Map interfaces
  • Collections utilities
  • Arrays utilities
  • Object utilities
  • The java.time package

Let’s begin!

Technical requirements

To be able to execute the code ...

Get Learn Java 17 Programming - Second 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.