Java Basics
Java Basics
heap ?
Ans: Yes
Java uses dynamic memory allocation on the heap to create and manage
objects.
Object instances are typically stored on the heap to allow for dynamic
and longer lifetimes, while the references to those objects are
managed on the stack or within other objects.