Dilip Kumar Jha’s Post

#Day02 After understanding how Java code gets executed, the next question is: 👉 Where does the data actually get stored? In JVM, memory is mainly divided into two parts: 🔹 Heap Memory • Used to store objects and class instances • Shared across all threads • Managed by Garbage Collection • Objects generally have longer lifetime 🔹 Stack Memory • Stores method calls and local variables • Each thread has its own stack • Automatically managed • Data exists only during method execution 📌 Key difference: Heap → Stores Objects Stack → Handles Execution (methods & variables) Understanding this difference helps in writing better and more efficient Java applications. #Java #JVM #BackendDevelopment #Learning

  • No alternative text description for this image

Continuing with JVM internals. Next, I’m planning to explore Garbage Collection in Java. Open to suggestions.

Like
Reply
See more comments

To view or add a comment, sign in

Explore content categories