CS51 - Fall 2009 - Lecture 2
variables as a way of labelling/naming something so that you can refer to it later
to use a variable you first declare it, and then assign a value to it. Assignment is done using "=" but this does not mean the same thing as "=" in math.
instance variables are variables that can be used in all methods, and in different calls to the same method. They are declared in a class but outside of all methods. For now, always private.
accessors (methods which return something, e.g.
) and mutators (methods which do something, e.g.
actual parameters and formal parameters
Combining instance variables and formal parameters