Advertisements
Advertisements
प्रश्न
The access specifier that is applicable in case of inheritance is:
विकल्प
default
private
public
protected
MCQ
Advertisements
उत्तर
protected
Explanation:
The protected modifier allows class variables and methods to be hidden from the general public while remaining fully visible and accessible to any subclass (child class) that inherits from it, even if that subclass resides in a completely different package.
shaalaa.com
क्या इस प्रश्न या उत्तर में कोई त्रुटि है?
