English

The most restricted access specifier is:

Advertisements
Advertisements

Question

The most restricted access specifier is:

Options

  • default

  • private

  • public

  • protected

MCQ
Advertisements

Solution

private

Explanation:

The private access modifier provides the maximum level of data security in Java. It hides variables or methods from the entire application, making them accessible only within the boundaries of the specific class where they are declared.
shaalaa.com
  Is there an error in this question or solution?
Chapter 6: Encapsulation - Exercises [Page 148]

APPEARS IN

Rupa Pandit Computer Applications [English] Class 10 ICSE
Chapter 6 Encapsulation
Exercises | Q 1. (viii) | Page 148
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×