What is the parent class of all Java classes?
Answer
Object
Answer
Object
The parent class of all Java classes is Object.
Object is defined in the java.lang package, which Java makes available automatically to every source file. If a class declaration does not explicitly use extends, Java implicitly makes it a direct subclass of Object. For example, class Bird is treated as though it extends Object.
This top-level position gives every Java object a common set of methods, including toString(), equals(), hashCode(), and getClass(). These methods support basic representation, comparison, hashing, and runtime type information. Object also provides thread-related methods such as wait(), notify(), and notifyAll().
A common mix-up is confusing Object with Class or String. Class describes runtime class metadata, while String is simply one particular Object subclass. Interfaces are a related exception: they do not themselves extend Object, although instances of classes implementing interfaces are still Objects. Arrays also inherit Object-level behavior, even though they are not declared with an ordinary class body.
Source: Wikipedia · fact-checked Aug. 2026