Computer Applications
Main class by default inherits another class. Explain the given statement.
Encapsulation & Inheritance in Java
21 Likes
Answer
In Java, Object class is known as the base class for all the classes. This class is present in the default package of java which is java.lang. For this reason, we don’t need to inherit this class explicitly. But each and every class in Java inherits Object class implicitly.
Answered By
13 Likes