Memory allocation in stack and deletion of local variables

P

pkumar

Guest
I am new to java programming and trying to understand how memory is allocated in stack. I read that at compile time, methods containing local variable are stored. Once, methods are used then these local variables are deleted from stack. My question is, what does happen when I call same method again. If memory was allocated at compile time and once method is executed and deleted from stack, then what will happen if I call method again? Thanks.

Memory allocation. Stack. Heap.

void somefunction(enter code here) { Member m; }

Continue reading...
 
Top