Skip to content
UPEEC

Heap and Stack in Java

Objects live on the shared heap; each thread has a stack of frames with locals and references.

Easy
Comments 0

StackOverflowError = too-deep recursion; OutOfMemoryError: Java heap space = heap full or leaking.

Spotted a mistake or want to add detail? Suggest an improvement — Content Contributors' edits are reviewed by editors before they go live.

Discussion (0)

Sign in or join free to ask questions and discuss this topic.