From where can a protected member of a Java class be accessed?
Correct answer B. Its own package, and subclasses in other packages
Explanation
Protected access includes everything package access allows, so any class in the same package may use the member. In addition, subclasses in other packages can access it, subject to a rule about the type of the reference used. It is therefore wider than package-private, not narrower, and non-subclass code elsewhere has no access.
Answer checked How we write and check questions
Discussion