Embed presentation
Downloaded 14 times




![public static void main(String args[])
{
Bike b=new Bike();
b.display();
}
}
OUTPUT: 100](https://image.slidesharecdn.com/superkeywordinjava-160611032322/85/Super-keyword-in-java-5-320.jpg)


The super keyword in Java is used to refer to the immediate parent class and its members. It can be used at the variable, method, and constructor level. For example, in a Bike class that extends the Vehicle class, using super.speed in the display() method will access the speed variable of the parent Vehicle class and output 100, rather than the speed variable defined in Bike which has a value of 200.




![public static void main(String args[])
{
Bike b=new Bike();
b.display();
}
}
OUTPUT: 100](https://image.slidesharecdn.com/superkeywordinjava-160611032322/85/Super-keyword-in-java-5-320.jpg)
