Instance Methods
Instance methods operate in the context of a particular class instance (object).
The instance variables of the current object can be accessed without any prefix:
public class Complex {
public void add(Complex z) {
real += z.real ;
imaginary += z.imaginary ;
}
public double real ;
public double imaginary ;
}