English

Main class by default inherits another class. Explain the given statement. - Computer Applications

Advertisements
Advertisements

Question

Main class by default inherits another class. Explain the given statement.

Short Answer

Solution

In Java, the Object class acts as the basic class for all other classes. This class is included in the default package of Java, java.lang. For this reason, we do not need to explicitly inherit this class. However, every class in Java inherits the Object class implicitly.

shaalaa.com
  Is there an error in this question or solution?
Chapter 8: Encapsulation and Inheritance - EXERCISES [Page 446]

APPEARS IN

Avichal Computer Applications [English] Class 10 ICSE
Chapter 8 Encapsulation and Inheritance
EXERCISES | Q V. 9. | Page 446
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×