KnowledgeBoat Logo

Computer Applications

The access modifier that gives least accessibility is:

  1. private
  2. public
  3. protected
  4. package

Encapsulation & Inheritance in Java

ICSE 2022

9 Likes

Answer

private

Reason — A data member or member method declared as private is only accessible inside the class in which it is declared. Thus, it gives the least accessibility.

Answered By

7 Likes


Related Questions