Given a method in a public class, what access modifier do you use to restrict access to that method to only the other members of the same class?
Answers
Answered by
2
private access modifier.
1. not access outside of the class.
2. you can access througout the same class
3. you can't access from the derived class.
as protected member.
1. not access outside of the class.
2. you can access througout the same class
3. you can't access from the derived class.
as protected member.
Similar questions