You want subclasses in any package to have access to members of a superclass. Which is the most restrictive access that accomplishes this objective?

  1. public

  2. protected

  3. private

  4. transient


Correct Option: B
Explanation:

protected makes a member accessible only to classes in the same package or subclass of the class

Find more quizzes: