Untitled Document

Subscribe here to get updates on new Videos

 

4. What are the various modifiers available in java?

 

 

 

previous homenext

 

Imp Conclusions:

1. The modifiers which are applicable for inner classes but not for outer classes.
A) private, protected, static.

2. The modifiers which are applicable for classes but not for interface are final.

3. The modifiers which are applicable for classes but not for enums are final and abstract.

4. The modifiers which are applicable only for methods and which we can’t use anyware else native.

5. The only modifiers which are applicable for contractors are.
A) public ,private, protected, default

6. The only applicable modifier for local variable is final.

 

a. The interface which is declared inside a class is always static where we are declaring or not.
b. The interface which is declared inside interface is always public and static whether we are declaring or not.
c. The class which is declared inside interface is always public and static whether we are declaring or not.