As I understand this, in Java, the Stack area stores the references to an object. The actual object is stored in the heap area. When an object no longer has something on the stack which refers to it, it is garbage-collected (freed for other use).
In other words, we reference an object(located in the heap) through variables located in the stack. Did I get that right?
