Normally, I use this in constructors only.
this
I understand that it is used to identify the parameter variable (by using this.something), if i
this.something
If the instance variables are same as the variables that are declared in the constructor then we use "this" to assign data.
class Example{ int assign;// instance variable Example(int assign){ // variable inside constructor this.assign=assign; } }
Hope this helps.