PrepZone Logo
PrepZone
Back to Java

Java · Easy

Differentiate between stack memory and heap memory.

JavaMemory & JVM

Answer preview

Stack — Per-thread, stores method frames (local variables, method parameters, return addresses). LIFO. Automatically freed when a method returns. Very fast allocation/deallocation.…