this
Within an instance method (or constructor) the keyword this refers to the current instance—the object on which the method was invoked (or that the constructor is initializing).
Appropriate usage—passing self-reference to some other method:
public class Complex {
. . . Definition of add(), etc.
public void addTo(Complex accumulator) {
accumulator.add(this) ;
}
}
Questionable usage—unnecessary prefix:
public void negate() {
this.real = – this.real ;
this.imaginary = – this.imaginary ;
}