Lecture 7
12
Variables and Values (review)
•Variable: named place to hold a value of a particular type
•Kinds of variables: fields (instance variables), local variables in methods, parameters          
•Variables must be declared before use
•Type is either:
–primitive (int,  char,  boolean,...)
–reference to an instance (object) of some class
•Why “reference to” ? Draw pictures ...