Multiple choice

A sub class can access private members of the super class.

  1. True

  2. False

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

Private members of a class are only accessible within the class in which they are declared. Even though a subclass inherits all members of its superclass, it cannot directly access private fields or methods. Instead, it must use public or protected getter and setter methods to interact with them.