Advertisements
Advertisements
प्रश्न
The access specifier that gives visibility to the package and to all the subclasses and the objects is ______.
विकल्प
default
private
public
protected
MCQ
रिक्त स्थान भरें
Advertisements
उत्तर
The access specifier that gives visibility to the package and to all the subclasses and the objects is protected.
Explanation:
The protected access modifier allows a class member (variable or method) to be accessed by any other class within the same package, as well as by any subclasses (inherited classes) even if they reside in completely different packages.
shaalaa.com
क्या इस प्रश्न या उत्तर में कोई त्रुटि है?
अध्याय 6: Encapsulation - Exercises [पृष्ठ १४८]
