DEV Community

Discussion on: Memory Management in Java

Collapse
 
elderjames314 profile image
James Oladimeji

Very educative post. In summary:
Primitive and reference variables are stored on the Stack, while the objects are stored on the heap. And the good news for Java developers, you don't have to bother by destroying objects after use, the almighty JVM takes care that for us under the hook.

Collapse
 
nanahawau profile image
Nana-hawau

Exactly!!