this Keyword
this refers to the current object.
// A use of this.
Rectangle(double w, double h) {
this.width = w; // this is used here
this.height = h;
}
Use this
to reference the hidden instance variables
Member variables and method parameters may have the same name. Under this situation we can use this to reference the member variables.
Rectangle(double width, double height) {
this.width = width;
this.height = height;
}