Vidyalelo
Java Programming · Q22

Inheritence

Programming · Java Programming · question 22

Q22

What is the purpose of the "protected" access modifier in Java inheritance?

A.
To make a member visible to all classes in any package
B.
To allow access to members within the same package and subclasses in any package
Answer
C.
To hide a member from all subclasses
D.
None of These

Answer: Option B

Solution

Answer: Option B
No explanation is given for this question Let's Discuss on Board