What is super keyword in Java?

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

  1. super can be used to refer immediate parent class instance variable.
  2. super can be used to invoke immediate parent class method.
  3. super() can be used to invoke immediate parent class constructor.