CSE 115
Introduction To Computer Science for Majors I
Lecture C
Lecture Notes #8
Stuart C. Shapiro
Spring, 2007
Issues with local variables
The scope of a variable is the block it's declared in.
The NullPointerException
Defining and calling a void method of no
arguments.
Instance variables (properties)
The Composition (has-a) relationship holds between a class,
C1, and the class, C2, of an instance variable when the constructor of
C1 creates a new instance of C2, and stores that instance in one of
its instance variables.