Advertisements
Advertisements
Question
The most restricted access specifier is:
Options
default
private
public
protected
MCQ
Advertisements
Solution
private
Explanation:
The private access modifier provides the maximum level of data security in Java. It hides variables or methods from the entire application, making them accessible only within the boundaries of the specific class where they are declared.
shaalaa.com
Is there an error in this question or solution?
Chapter 6: Encapsulation - Exercises [Page 148]
