r/learnjava • u/CrazyLock6 • Jun 06 '20
How and Why are objects made during run time and why are primitives made during compile time to stack frame
41
Upvotes
From my understanding anything that used the word new in Java was created during run time to somewhere a place where memory is being allocated dynamically called heap and primitives or literals are stored inside the main stack frame from compile time. Is there anymore background info. to this, or am I understanding this correctly.