aspose file tools
The moose likes Java in General and the fly likes Heap and Stack Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Java in General
Reply Bookmark "Heap and Stack" Watch "Heap and Stack" New topic
Author

Heap and Stack

Deepak Yadav
Greenhorn

Joined: May 22, 2008
Posts: 9
Objects are in heap methods are in stack
where these heap and stack resides in RAM or in Hard disk.
Please give me this answer ?
Sagar Rohankar
Ranch Hand

Joined: Feb 19, 2008
Posts: 2896
    
    1

Right, heap and stack resides in RAM, (unless the underlying OS is not consider paging !)


[LEARNING bLOG] | [Freelance Web Designer] | [and "Rohan" is part of my surname]
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12271
    
    1
Objects are in heap methods are in stack


Where did you get that?
Method code resides in objects, things on the stack for a given Thread are the references and data used in calls by the Thread to a method.

Bill


Java Resources at www.wbrogden.com
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Heap and Stack
 
Similar Threads
Where do primitive types live?
Heap / Stack
When will a variable use memory from stack and when will use memory from heap?
JVM memory management
Where do static variables (class variables) live (scope)?