---
title: "Discussion on \"Memory management in java\" | Hashnode"
description: "Discussion on \"Memory management in java\". Memory management in Java\n2 types of memory\n1) Stack\n2) Heap\nStack memory:\n---Stores temporary variables and separate memory block for methods.\n--- Store primitive data types\n--- Store Reference of heap objects.\n1) Strong reference\n2)Weak references\n..."
url: "https://hashnode.com/posts/memory-management-in-java/6698ba9104ce464bc022af6c"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Memory management in java](https://priyaranjan001.hashnode.dev/memory-management-in-java?utm_source=hashnode&utm_medium=feed)

Memory management in Java 2 types of memory 1) Stack 2) Heap Stack memory: ---Stores temporary variables and separate memory block for methods. --- Store primitive data types --- Store Reference of heap objects. 1) Strong reference 2)Weak references ...

Jul 18, 2024 · 2 min read · priyaranjan001.hashnode.dev  
Read the article

-   [#java](https://hashnode.com/tag/java)
-   [#memory-management](https://hashnode.com/tag/memory-management)
-   [#stack](https://hashnode.com/tag/stack)
-   [#heap](https://hashnode.com/tag/heap)
-   [#heap-memory](https://hashnode.com/tag/heap-memory)
-   [#garbagecollection](https://hashnode.com/tag/garbagecollection)

## Written by

[Priya Ranjan](https://hashnode.com/@Priyaranjan01)

@Priyaranjan01

  
[View profile](https://hashnode.com/@Priyaranjan01)

#starts from scratch.

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
