---
title: "Discussion on \"Heap and Stack Memory in Java\" | Hashnode"
description: "Discussion on \"Heap and Stack Memory in Java\". Heap and stack memory are both used during program execution, each serving a distinct purpose."
url: "https://hashnode.com/posts/heap-and-stack-memory-in-java/685da50fc9b5c8d29cf5eb18"
---

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

Discussion

# [Heap and Stack Memory in Java](https://java-harshitsingh.hashnode.dev/heap-and-stack-memory-in-java?utm_source=hashnode&utm_medium=feed)

Heap and stack memory are both used during program execution, each serving a distinct purpose.

Jun 26, 2025 · 1 min read · java-harshitsingh.hashnode.dev  
Read the article

-   [#java](https://hashnode.com/tag/java)
-   [#heap](https://hashnode.com/tag/heap)
-   [#stack](https://hashnode.com/tag/stack)
-   [#stack-memory](https://hashnode.com/tag/stack-memory)
-   [#stack-vs-heap](https://hashnode.com/tag/stack-vs-heap)
-   [#interview](https://hashnode.com/tag/interview)
-   [#programming-blogs](https://hashnode.com/tag/programming-blogs)
-   [#programming-tips](https://hashnode.com/tag/programming-tips)
-   [#programming-languages](https://hashnode.com/tag/programming-languages)
-   [#interview-questions](https://hashnode.com/tag/interview-questions)

## Written by

[Harshit Singh](https://hashnode.com/@HarshitSingh025)

@HarshitSingh025 · India

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

Developer, building useful thing for web.

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
