A Java class defines a type.
An instance of a class is a value of that type.
A variable declared as a class type is not allocated memory to hold a value of the size of the type.
A variable declared of class type is automatically allocated memory to hold a reference, either null or the address of a class instance.
Declaring a local variable in a method of class type allocates memory for the reference (address or null) only on the call stack.
Class instances can only be allocated using "new" and so instance values are always located on the heap, not on the call stack.
Assignment of reference types does not make a copy of the value referenced (a copy of the address is made);
StringBuffer s1 = new StringBuffer("abc"); StringBuffer s2; s2 = s1; s1.append("de"); Now s1 and s2 both reference the StringBuffer with value "abcde"; there is only one StringBuffer.