What modifier should you use on the members of a class so that they are not accessible to another class in a different package, but are accessible to any subclasses in any package?

What modifier should you use on the members of a class so that they are not accessible to another class in a different package, but are accessible to any subclasses in any package?


A. public
B. private
C. protected
D. Use the default modifier.

The correct answer is C


Java

Learn More Multiple Choice Question :