Advertisements
Advertisements
प्रश्न
The access specifier that gives visibility to the class only is ______.
पर्याय
default
private
public
protected
MCQ
रिकाम्या जागा भरा
Advertisements
उत्तर
The access specifier that gives visibility to the class only is private.
Explanation:
The private access modifier provides the highest level of restriction in Java. When a variable, method, or constructor is declared as private, it is hidden from the rest of the application and can only be seen and accessed by code inside that exact same defining class.
shaalaa.com
या प्रश्नात किंवा उत्तरात काही त्रुटी आहे का?
पाठ 6: Encapsulation - Exercises [पृष्ठ १४८]
