✓This Keyword Definition
This is a keyword. This is a reference variable that referes to the current object.
✓Usage of This Keyword- This Keyword can be used to refer current class instance variable
- This() can be used to invoke current class constructor.
- This Keyword can be used to invoke current class methods.
- This can be passed as an argument in the method call.
- This can be passed as an argument in the constructor call.
- This Keyword can also be used to return the current class instance.
Super is a keyword. Super is a reference variable that is used to refer immediate parent class object.
✓Usage of Super Keyword- Super is used to refer immediate parent class instance variable.
- Super() is used to invoke immediate parent class constructor.
- Super Keyword is used to invoke immediate parent class methods.