Multiple choice

What is the role of protected specifier in java?

  1. The member of the class can be accessed inside the same package as well as in the subclass of the class in other package.

  2. The member can be accessed only in the same package.

  3. Members can be accessed inside the particular class only.

  4. Members can be accessed everywhere outside the class as well as in the other packages too.

  5. None of the above

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

This is true about protected specifier in java.