© Kishori Sharan and Adam L. Davis 2022
K. Sharan, A. L. DavisBeginning Java 17 Fundamentalshttps://doi.org/10.1007/978-1-4842-7307-4_11

11. Object and Objects Classes

Kishori Sharan1   and Adam L. Davis2
(1)
Montgomery, AL, USA
(2)
Oviedo, FL, USA
 
In this chapter, you will learn:
  • The hierarchical class structure in Java

  • That the Object class is the superclass of all other classes

  • How to use methods of the Object class with detailed examples

  • How to reimplement methods of the Object class in your class

  • How to check two objects for equality

  • The difference between immutable and mutable objects

  • How to use the utility methods of the Objects class to deal with null values gracefully

  • A brief introduction to lambda expressions

All classes in this chapter are a member ...

Get Beginning Java 17 Fundamentals: Object-Oriented Programming in Java 17 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.