THIS Keyword in Java with Example

Dev Singh. October 06, 2019 Comments

What is THIS Keyword in Java?

Keyword THIS is a reference variable in Java that refers to the current object.

The various usages of 'THIS' keyword in Java are as follows:

  • It can be used to refer instance variable of current class
  • It can be used to invoke or initiate current class constructor

 

https://www.guru99.com/java-this-keyword.html

  • java