which acceess modifier must be used to restrict access to that method to only the other member of the same class
Answers
Answered by
109
Private
The private access modifier is specified using the keyword private. The methods or data members declared as private are accessible only within the class in which they are declared. Any other class of same package will not be able to access these members. private means “only visible within the enclosing class”.
Similar questions
Political Science,
5 months ago
Social Sciences,
5 months ago
Math,
10 months ago
Science,
10 months ago
Political Science,
1 year ago
Math,
1 year ago