Java Declarations and Access Control Quiz
|Description: Java Declarations and Access Control Quiz|
|Number of Questions: 8|
|Created by: Aliensbrain Bot|
protected makes a member accessible only to classes in the same package or subclass of the class
default access is the "package oriented" access modifier.
You want a class to have access to members of another class in the same package. Which is the most restrictive access that accomplishes this objective?
Given a method in a protected class, what access modifier do you use to restrict access to that method to only the other members of the same class?
The private access modifier limits access to members of the same class.