Memory & JVM interview questions

18 real Memory & JVM questions from the Java bank, as asked in Indian campus drives and tech interviews. Every question has a verified answer and an AI-tutor explanation on placd — free to start.

1. What is Heap?

Junior
  1. A.the per-thread region that stores method call frames, local variables, and primitive values
  2. B.the runtime memory region where all objects and arrays are allocated and managed by garbage collection
  3. C.the default region-based garbage collector since Java 9 that aims for predictable low pause times on large heaps
  4. D.the runtime translation of frequently executed bytecode into native machine code for faster execution
Reveal the answer + AI explanation — free account

3. Which statement is correct?

Junior
  1. A.Heap — the per-thread region that stores method call frames, local variables, and primitive values
  2. B.Heap — the automatic process of reclaiming heap memory occupied by objects no longer reachable from any live reference
  3. C.Heap — the runtime memory region where all objects and arrays are allocated and managed by garbage collection
  4. D.Heap — the runtime translation of frequently executed bytecode into native machine code for faster execution
Reveal the answer + AI explanation — free account

4. What is Stack memory?

Junior
  1. A.the per-thread region that stores method call frames, local variables, and primitive values
  2. B.the platform-independent instruction set in a .class file that the JVM interprets or compiles at runtime
  3. C.the default region-based garbage collector since Java 9 that aims for predictable low pause times on large heaps
  4. D.the automatic process of reclaiming heap memory occupied by objects no longer reachable from any live reference
Reveal the answer + AI explanation — free account

6. Which statement is correct?

Junior
  1. A.Stack memory — the runtime memory region where all objects and arrays are allocated and managed by garbage collection
  2. B.Stack memory — the platform-independent instruction set in a .class file that the JVM interprets or compiles at runtime
  3. C.Stack memory — the default region-based garbage collector since Java 9 that aims for predictable low pause times on large heaps
  4. D.Stack memory — the per-thread region that stores method call frames, local variables, and primitive values
Reveal the answer + AI explanation — free account

7. What is Garbage collection?

Mid
  1. A.the runtime translation of frequently executed bytecode into native machine code for faster execution
  2. B.the automatic process of reclaiming heap memory occupied by objects no longer reachable from any live reference
  3. C.the default region-based garbage collector since Java 9 that aims for predictable low pause times on large heaps
  4. D.the platform-independent instruction set in a .class file that the JVM interprets or compiles at runtime
Reveal the answer + AI explanation — free account

9. Which statement is correct?

Mid
  1. A.Garbage collection — the runtime memory region where all objects and arrays are allocated and managed by garbage collection
  2. B.Garbage collection — the automatic process of reclaiming heap memory occupied by objects no longer reachable from any live reference
  3. C.Garbage collection — the runtime translation of frequently executed bytecode into native machine code for faster execution
  4. D.Garbage collection — the platform-independent instruction set in a .class file that the JVM interprets or compiles at runtime
Reveal the answer + AI explanation — free account

10. What is G1 collector?

Senior
  1. A.the platform-independent instruction set in a .class file that the JVM interprets or compiles at runtime
  2. B.the default region-based garbage collector since Java 9 that aims for predictable low pause times on large heaps
  3. C.the runtime memory region where all objects and arrays are allocated and managed by garbage collection
  4. D.the runtime translation of frequently executed bytecode into native machine code for faster execution
Reveal the answer + AI explanation — free account

12. Which statement is correct?

Senior
  1. A.G1 collector — the automatic process of reclaiming heap memory occupied by objects no longer reachable from any live reference
  2. B.G1 collector — the platform-independent instruction set in a .class file that the JVM interprets or compiles at runtime
  3. C.G1 collector — the default region-based garbage collector since Java 9 that aims for predictable low pause times on large heaps
  4. D.G1 collector — the per-thread region that stores method call frames, local variables, and primitive values
Reveal the answer + AI explanation — free account

13. What is Bytecode?

Mid
  1. A.the runtime memory region where all objects and arrays are allocated and managed by garbage collection
  2. B.the default region-based garbage collector since Java 9 that aims for predictable low pause times on large heaps
  3. C.the platform-independent instruction set in a .class file that the JVM interprets or compiles at runtime
  4. D.the automatic process of reclaiming heap memory occupied by objects no longer reachable from any live reference
Reveal the answer + AI explanation — free account

15. Which statement is correct?

Mid
  1. A.Bytecode — the automatic process of reclaiming heap memory occupied by objects no longer reachable from any live reference
  2. B.Bytecode — the default region-based garbage collector since Java 9 that aims for predictable low pause times on large heaps
  3. C.Bytecode — the runtime memory region where all objects and arrays are allocated and managed by garbage collection
  4. D.Bytecode — the platform-independent instruction set in a .class file that the JVM interprets or compiles at runtime
Reveal the answer + AI explanation — free account

16. What is JIT compilation?

Senior
  1. A.the automatic process of reclaiming heap memory occupied by objects no longer reachable from any live reference
  2. B.the platform-independent instruction set in a .class file that the JVM interprets or compiles at runtime
  3. C.the runtime memory region where all objects and arrays are allocated and managed by garbage collection
  4. D.the runtime translation of frequently executed bytecode into native machine code for faster execution
Reveal the answer + AI explanation — free account

18. Which statement is correct?

Senior
  1. A.JIT compilation — the default region-based garbage collector since Java 9 that aims for predictable low pause times on large heaps
  2. B.JIT compilation — the runtime memory region where all objects and arrays are allocated and managed by garbage collection
  3. C.JIT compilation — the runtime translation of frequently executed bytecode into native machine code for faster execution
  4. D.JIT compilation — the per-thread region that stores method call frames, local variables, and primitive values
Reveal the answer + AI explanation — free account

Free to start

Answers, AI explanations, and a scored voice mock interview

Sign up free to check your answers with explanations, ask the AI tutor anything on any question, and take one full AI mock interview — scored like a real panel.

Practice Memory & JVM free