created: 12/30/98; revised: 09/26/99, 01/21/00, 07/14/02, 01/19/06

CHAPTER 34A — Parameters, Local Variables,
and Overloading

The state of an object is the data it is currently holding. An object stores its state in its instance variables. For example, the state of a CheckingAccount object is the value of the three variables accountNumber, accountHolder, and balance. Instance variables hold their values until they are explicitly changed or until the object is destroyed.

An object's methods frequently work with values that are not part of an object's state. These values are held in the local variables and parameters of methods. This chapter discusses how these are declared and used.

Chapter Topics:


(Review:) What is a parameter of a method?