Multiple choice java

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

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

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