*
The moose likes Beginning Java and the fly likes When will a variable use memory from stack and when will use memory from heap? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "When will a variable use memory from stack and when will use memory from heap?" Watch "When will a variable use memory from stack and when will use memory from heap?" New topic
Author

When will a variable use memory from stack and when will use memory from heap?

Mr Chan
Greenhorn

Joined: Jun 08, 2002
Posts: 2
When will a variable use memory from stack and use memory from heap?
jason adam
Chicken Farmer ()
Ranch Hand

Joined: May 08, 2001
Posts: 1932
This question is not based on I/O or streams, would probably be better answered in the beginners forum.
Jack J. Jackson
Greenhorn

Joined: Apr 20, 2002
Posts: 27
Local variables are allocated from stack whereas instance and class variables are allocated as part of object instantiation and consume heap memory.


Jack
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: When will a variable use memory from stack and when will use memory from heap?