I have read
As per "Java 2 Certification Guide" -Simon Roberts etc. page 22, when ever a new object is created, it is stored on the heap however variable containing reference to it will be stored on stack.
made confusion in my head (like who was before a hen or an egg?)
An object almost always has reference-variables. Object is on the heap, but his internals are on the stack?
I do not quite understand what is the object, where it is and how it gc(-ed).
Does it mean that each object creation creates their own heap and stack, per each object?
[ January 07, 2003: Message edited by: yidanneuG ninaV ]
(Marilyn fixed link)
[ January 07, 2003: Message edited by: Marilyn de Queiroz ]