Skip to content
  • Articles
  • Contact
  • About

#memory

Memory Management in Java | Heap vs Stack

Posted on 2021-10-31 by Muhammad Wasi Naseer

In Java, a variable can either hold a primitive type or a reference of an object. This holds true for all cases. Primitive types are stored in stack and objects are stored in heap. To store objects, it needs to maintain their structure. We’ve always heard that a variable can be passed by value or …

Continue reading “Memory Management in Java | Heap vs Stack”

© 2023 Writings Theme. Powered by WordPress.
  • Twitter
  • Github
  • Stackoverflow
  • LinkedIn