Single Choice Easy

QWhat is the parent class of all Java classes?

ID: #23123 Inheritance in Java (IS-A) 90 views
Question Info
#23123Q ID
EasyDifficulty
Inheritance in Java (IS-A)Topic

Choose the Best Option

Click any option to instantly check if you're correct.

  • A Object
  • B Class
  • C Parent
  • D Base
Correct Answer

Explanation

In Java, Object is the superclass of all other classes. Every class in Java, either directly or indirectly, inherits from the Object class. This means that methods defined in the Object class, such as toString(), hashCode(), and equals(), are available to all Java classes. This inheritance forms the root of Java's class hierarchy, providing fundamental behavior that all Java objects share. Understanding this concept is crucial for utilizing polymorphism and implementing custom behavior in subclasses.

Share This Question

Challenge a friend or share with your study group.