English

Which keyword makes class members accessible outside the class in which they are declared? - Computer Applications

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?
Chapter 6: Class as the Basis of all Computation (Objects and Classes) - EXERCISES [Page 382]

APPEARS IN

Avichal Computer Applications [English] Class 10 ICSE
Chapter 6 Class as the Basis of all Computation (Objects and Classes)
EXERCISES | Q I. 1. | Page 382
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×