English

State True or False. Member data and methods declared under protected access specifier are availlable to members of its own class and to its subclasses and not to any other class.

Advertisements
Advertisements

Question

State True or False.

Member data and methods declared under protected access specifier are availlable to members of its own class and to its subclasses and not to any other class.

True or False
Advertisements

Solution

This statement is true.

Explanation:

Members declared with the protected access specifier are accessible within their own class and by subclasses (child classes). They are not accessible by unrelated classes outside the inheritance relationship.

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 3. (ii) | Page 148
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×