9.7 Object Superclass

Enduring Understanding

When multiple classes contain common attributes and behaviors, programmers create a new class containing the shared attributes and behaviors forming a hierarchy. Modifications made at the highest level of the hierarchy apply to the subclasses.

Learning Objective

Call Object class methods through inheritance.

Essential Knowledge

The Object class is the superclass of all other classes in Java.

The Object class is part of the java.lang package

The following Object class methods and constructors—including what they do and when they are used—are part of the Java Quick Reference:

  • boolean equals(Object other)

  • String toString()

Subclasses of Object often override the equals and toString methods with class- specific implementations.

Last updated

Was this helpful?