Multiple choice java

Methods that are marked protected can be called in any subclass of that class.

  1. True

  2. False

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

Protected members are accessible within the same package and by subclasses (even if in different packages). This is the defining characteristic of protected access - more visible than private but restricted compared to public.

AI explanation

True. In Java (and similar OOP languages), a 'protected' member is accessible within its own class, within the same package, and — critically — within any subclass of that class, even subclasses in a different package. That's precisely what distinguishes 'protected' from default (package-private) access. So the statement is an accurate description of protected visibility, making True correct.