posted 22 years ago
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