How are this and super used

This is used to refer to the current object instance. super is used to refer to the variablesand methods of thesuperclass of the current object instance.

Showing Answers 1 - 1 of 1 Answers

This() is used to refer the class scope variables. and method scope variables and it is used to invoke a constructor of the same class.
super() is used to refer super-class member and subclass member and it invoke a super-class constructor.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions