Hello All...
Whenever a class is loaded, what are stored in the heap and what are stored in the stack ?
Also where does the threads reside ?
Thanks in advance...
Hello All...
Whenever a class is loaded, what are stored in the heap and what are stored in the stack ?
Also where does the threads reside ?
Thanks in advance...
Reference types are in heap.
Any primitive type data and references to values on heap (parameters / local variables of method) are on the stack.
Each thread has its own stack.
All threads in the application share same heap.