What is this() and super() in java?

1 min read
This() and super() both are the keywords in java.
If we want the access the super class/parent class data member or member function then we can use super() in java.
If we want to access the member or member function from the current class then we can use this() in java.
this keyword is also use to differentiate between the local variable or global.
Super is used to call or execute super class member .
0
Subscribe to my newsletter
Read articles from Mitali sahu directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
