wood burning stoves 2.0*
The moose likes Beginning Java and the fly likes Where is the Methods place in Memory ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Where is the Methods place in Memory ?" Watch "Where is the Methods place in Memory ?" New topic
Author

Where is the Methods place in Memory ?

Rashid Ali
Ranch Hand

Joined: Jan 16, 2001
Posts: 349
I would like to know that where in memory the static and non-static methods and other class members such as instance, static and non-static variable lies.
Could anybody let me know please.
Kind regards
Rashid Ali
Bosun Bello
Ranch Hand

Joined: Nov 06, 2000
Posts: 1510
They are placed in an area of the memory called the "Heap".

Bosun


Bosun (SCJP, SCWCD)
So much trouble in the world -- Bob Marley
Cindy Glass
"The Hood"
Sheriff

Joined: Sep 29, 2000
Posts: 8521
Variables are kept in stacks, an area separate from the heap. There is a separate stack for each method invoked for local variables. Constants are kept in a Constant pool which may be implemented in the heap (JVM dependant).
There is a method area on the heap that keeps both static and non-static methods. Objects (instances of classes) are kept on the heap.


"JavaRanch, where the deer and the Certified play" - David O'Meara
Rashid Ali
Ranch Hand

Joined: Jan 16, 2001
Posts: 349
Thank to both of you for your replies which sufficiently suffices my querry.
Kind wishes
Rashid Ali
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Where is the Methods place in Memory ?
 
Similar Threads
Static methods
static variables memory
Methods memory allocation
static methods
Methods