English

Give reason: In what circumstances is a class derived publicly? - Computer Applications

Advertisements
Advertisements

Question

Give reason:

In what circumstances is a class derived publicly? 

Give Reasons

Solution

A subclass can only inherit a base class in Java using public inheritance. An openly derived class can access the base class's public and protected members. Derived classes do not inherit base class private members. 

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. 15. (a) | Page 446
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×