The super keyword in Java is a reference variable which is used to refer immediate parent class object. Whenever you create the instance of a subclass, an instance of the parent class is created implicitly which is referred by the super reference variable. The keyword “super” came into the picture with the concept of Inheritance.
Usage of Java super Keyword
- super can be used to refer immediate parent class instance variable.
- super can be used to invoke immediate parent class method.
- super() can be used to invoke immediate parent class constructor.