English

Which of the following keywords are used to control access to a class member?

Advertisements

Question

Which of the following keywords are used to control access to a class member? 

Options

  • Default

  • Abstraction

  • Protected

  • Interface

MCQ
Advertisements

Solution

Protected

Explanation:

Protected is an access specifier that controls a class member's visibility. It enables members to be accessed within the class, inherited (sub) classes, and even within the same package (in languages like Java). 

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. 5. | Page 382
Advertisements
Share
Notifications



      Forgot password?
Use app×