1.

What Are Different Types Of Access Modifiers?

Answer»

ACCESS specifiers are KEYWORDS that determine the type of access to the member of a class. These keywords are for allowing privileges to parts of a program such as functions and variables. These are:
• Public : accessible to all CLASSES
PROTECTED : accessible to the classes within the same package and any subclasses.
• Private : accessible only to the class to which they belong
• Default : accessible to the class to which they belong and to subclasses within the same package.

Access specifiers are keywords that determine the type of access to the member of a class. These keywords are for allowing privileges to parts of a program such as functions and variables. These are:
• Public : accessible to all classes
• Protected : accessible to the classes within the same package and any subclasses.
• Private : accessible only to the class to which they belong
• Default : accessible to the class to which they belong and to subclasses within the same package.



Discussion

No Comment Found