Java: Memory (Heap vs Stack)
Published in
Dec 22, 2021
Heap Memory
Heap Memory is used for dynamic memory allocation of Java Objects.
Stack Memory
Stack Memory used for static memory allocation and execution of a single thread. It store local primitive value and reference to objects in heap.