KnowledgeBoat Logo
|

Computer Applications

A private member method is only accessed:

  1. In the scope of the same class in which it is defined.
  2. Anywhere outside the class in which it is defined.
  3. In the derived class.
  4. None of the above.

Encapsulation & Inheritance in Java

13 Likes

Answer

In the scope of the same class in which it is defined.

Reason — A private member method is only accessed in the scope of the same class in which it is defined.

Answered By

7 Likes


Related Questions