Multiple choice

Which of the following does not have a superclass in Java programming?

  1. System

  2. Object

  3. Lang

  4. Exception

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

Object is the class and this class is the mother of all classes. Every class in java extends class Object, means the superclass of everything. Any class that does not explicitly extends another class implicitly extends object class. For example: public class lion extends Object {} class lion, which extends class Object explicitly, public class dog {},in this example class dog extends class Object implicitly.