The access specifier that gives least accessibility is:

ICSE Class 10 Computer Applications PYQ · 2024 Paper · Section A

1(iv)1 Mark · 2024 · Section A · 2024 Paper

The access specifier that gives least accessibility is:

Show SolutionHide Solution↓

private

Reason — In Java, access specifiers determine the visibility or accessibility of classes, methods, and variables. The three main access specifiers are:

  1. public: Accessible from anywhere in the program.
  2. protected: Accessible within the same package and by subclasses even if they are in different packages.
  3. private: Accessible only within the same class.

private gives least accessibility as it provides the most restricted access.

← Previous questionNext question →

Browse the free Computer Applications sample bank