Computer Science, asked by smritigautam4412, 1 year ago

An access modifier cannot be applied on a

Answers

Answered by syedtalha777
0
Protected Access Modifier - Protected. Variables, methods, and constructors, which are declared protected in a superclass can be accessed only by the subclasses in other package or any class within the package of the protected members' class. The protected access modifier cannot be applied to class and interfaces.
Answered by edupilot004
0

Answer:

The correct answer is protected access modifier.

Explanation:

The Protected access modifier is used in programming languages such as c, c++, c# and java.

It is the process of member getting access to their self packages such a private and the other package is of sub-class. It particularly hides the variables of the members and functions from the different classes and objects.

Example of access modifiers are as follows:

1. Public modifier.

2. protected modifier.

3. No modifier

4. Private modifier.

#SPJ3

Similar questions