A

Admin • 832.27K Points
Coach

Q. In Java, can a subclass access private members (fields and methods) of its superclass?

  • (A) Yes, as long as the subclass is in the same package
  • (B) Yes, regardless of the access modifier
  • (C) No, private members are not visible to subclasses
  • (D) Only if the superclass is marked as "final"
  • Correct Answer - Option(C)
  • Views: 17
  • Filed under category Java
  • Hashtags:

No solution found for this question.
Add Solution and get +2 points.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.