Advertisements
Advertisements
Question
______ access specifier does not allow any member to be accessed out of the class.
Options
Private
Public
Protected
Default
MCQ
Fill in the Blanks
Advertisements
Solution
Private access specifier does not allow any member to be accessed out of the class.
Explanation:
- The private access specifier does not allow any class member to be accessed from outside the class.
- It provides data security by restricting direct access to variables and methods.
shaalaa.com
Is there an error in this question or solution?
Chapter 1: Revision of Class 9 Syllabus - Exercises [Page 42]
