Z
Z
zxcigan2022-01-04 21:31:13
Java
zxcigan, 2022-01-04 21:31:13

Where are local variables stored in memory?

Hello everyone, such a question, when creating a local variable in JAVA, are these variables stored on the heap, or on the stack?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
J
Jacen11, 2022-01-04
@Jacen11

literally the very first link. Banned in Yandex?
61d4a05018dbc595444549.png

D
Dmitry Roo, 2022-01-04
@xez

Objects on the heap.
Primitives and references are on the stack.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question