Vidyalelo
Java Programming · Q27

Inheritence

Programming · Java Programming · question 27

Q27

In Java, can a subclass inherit private fields from its superclass?

A.
Yes, a subclass inherits private fields
B.
Only if the subclass is marked as "final"
C.
No, private fields are not inherited by subclasses
Answer
D.
Only if the superclass is marked as "static"

Answer: Option C

Solution

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