Memory Allocation

ØAll local variables are stored on a stack
§These variables are de-allocated in a last in first out (LIFO) fashion as soon as the method terminates
§All local references are stored on stack
ØAll arrays objects and other objects are stored on heap
§They need not be de-allocated in any specific order
§They can be garbage collected (removed from the memory)  when their use is over
ØAll instance variables are stored on heap as part of their Objects