Skip to content
Sharp

Memory Management · interview question

In Java, where are local variables and method call frames stored?

Multiple choiceMediumchapter-14-curatedpremiummemory-managementstack-vs-heap
Choose one answer
Answer and explanation

Correct answer

A. On the Stack

Why

Local variables and method call frames are stored on the Stack, which is a region of memory that organizes execution in a Last-In-First-Out (LIFO) manner. This allows for efficient tracking of active methods and their local variables.

Test yourself on Memory Management

A free test with instant, explained results. No account needed.

Start free test
All Memory Management questions →