Java Tutorial Part 40| Super Keyword is Used to Invoke Immediate Parent Class Constructor

preview_player
Показать описание
The super keyword in Java is a reference variable which is used to refer immediate parent class object.
Whenever you create the instance of subclass, an instance of parent class is created implicitly which is referred by super reference variable.
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.
We can use super keyword to access the data member or field of parent class. It is used if parent class and child class have same fields.

If this video is useful to you, please like and share If you didn't subscribe kindly subscribe. So that you will get a notification about my new videos

#ARIVU_INFO
Рекомендации по теме