Advertisements
Advertisements
Question
Which keyword makes class members accessible outside the class in which they are declared?
Options
Private
Protected
Public
Hidden
MCQ
Solution
Public
Explanation:
When a class member (such as a variable or method) is declared public, it becomes available from outside the class in which it is defined. This is used to grant other portions of the application access to specific class features or data.
shaalaa.com
Is there an error in this question or solution?