Super keyword 

It is utilized inside a sub-class technique definition to call a strategy characterized in the super class. Private techniques for the super-class can't be called. Just open and secured techniques can be called by the super catchphrase. It is additionally utilized by class constructors to summon constructors of its parent class

Use of java super Keyword 


  1. super can be utilized to allude prompt parent class example variable. 
  2. super can be utilized to summon quick parent class strategy. 
  3. super() can be utilized to conjure quick parent class constructor.


Example

_________________________________________________________________________________

public class human

{
public int a;
public a()
{
System.out.println("variable is" + this.a);
}
}
public class student extends human
{
public a()
{
System.out.println("variable is" + super.a);

}

}

_________________________________________________________________________________super is used to access the variable of parent class when inheritance is done between the classes.

Next lecture                                                                                                                    Previous Lecture