Ivars
We are already familiar with ivars. This class has two ivars.
public class Rectangle {

	private int width;
	private int height;
Method Parameters (Params) and Local Variables
A method may contain the following:

  • Method Parameters
  • Local Variables
public void applyFactors(
1
int factor1, int factor2)
{ //The area of the rectangle
2
int newWidth, newHeight; newWidth = this.width * factor1; newHeight = this.height * factor2; this.width = newWidth; this.height = newHeight; }