Super and this keyword in java | What is this and super in java ? Java tutorials

Published: 30 April 2023
on channel: SJ Programming Solutions
233
7

What is super keyword ?
What are the uses of super keyword ?
What is this keyword ?

The super keyword used for two purposes:

If the super class instance variable name is same as that of the child class or subclass instance variable name, then super keyword is used only inside the subclass to access the super class instance variable.
Java uses super keyword for explicitly calling the super class constructor within the child class constructor

this keyword :

this Keyword is used to refer the current class instance variables.
Used to invoke current class methods.
Used to call current class constructor.
To reuse the constructor we use this keyword.

Thank you for watching !

if anyone is interested to learn java in depth through live classes or one to one sessions then you can connect with us on below :

mail : sjprogrammingsolutions@gmail.com

#javaprogramming #superkeyword #thiskeyword #inheritance #sjprogrammingsolutions


On this page of the site you can watch the video online Super and this keyword in java | What is this and super in java ? Java tutorials with a duration of hours minute second in good quality, which was uploaded by the user SJ Programming Solutions 30 April 2023, share the link with friends and acquaintances, this video has already been watched 233 times on youtube and it was liked by 7 viewers. Enjoy your viewing!