1(ix)
Which of the following access specifiers will make a member accessible only within its own class?
- (a)public
- (b)private
- (c)protected
- (d)default
Show SolutionHide Solution↓
private
Reason — In Java, the private access specifier restricts a member’s visibility so it can be accessed only within the same class where it is declared.