Multiple choice technology programming languages

Methods which are marked as Protected can be accessed only by classes with in the same package?

  1. True

  2. False

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

The statement is false. Protected methods can be accessed by subclasses (even in different packages) AND by classes within the same package. The access scope is wider than just the same package - it extends to child classes regardless of package.