Static Keyword in Java: Static Is A Non-Access Modifier in Java Which Is Applicable For
Static Keyword in Java: Static Is A Non-Access Modifier in Java Which Is Applicable For
1. blocks
2. variables
3. methods
4. nested classes
Static variables
Output:
from m1
Inside static block
Value of a : 20
from main
Super Keyword in Java
The super keyword in java is a reference variable that is used to
refer parent class objects. The keyword “super” came into the
picture with the concept of Inheritance. It is majorly used in the
following contexts:
Output:
Private keyword
Interfaces