Where does the JVM store primitive variables?

Viewed 25042

Where does the Java JVM store primitive variables, and how is the memory used by primitives freed after use?

I guess it is on the stack?

3 Answers
  • Class objects, including method code and static fields: heap.
  • Objects, including instance fields: heap.
  • Local variables and calls to methods: stack..
Related