Advertisements
Advertisements
प्रश्न
Give reason:
In what circumstances is a class derived publicly?
कारण बताइए
उत्तर
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
क्या इस प्रश्न या उत्तर में कोई त्रुटि है?
अध्याय 8: Encapsulation and Inheritance - EXERCISES [पृष्ठ ४४६]