What is this keyword in java | why we use this keyword in java | where we use this keyword
There can be a lot of usage of Java this keyword.
In java, this is a reference variable that refers to the current Object.
This can be used to refer current class instance variable
This can be used to invoke current class method (Implicitly)
This() can be used to invoke current class constructor
this can be passed as an argument in the method call
this can be passed as argument in the constructor call
this can be used to return the current class instance from the method