Skip to Main Content

Java HotSpot Virtual Machine

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Java Heap --- Stack

843811Jun 1 2001 — edited Aug 7 2001
Java Heap and Stack memory allocation.

Since in Java, you always use new()
method to allocate memorys, which is allocated
on heap even the variable is declared within functions.

So the stack only store the object reference,
while the heap store all the object, is this correct?

Thx
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 4 2001
Added on Jun 1 2001
27 comments
836 views