Skip to content
Sharp

JVM Architecture · interview question

In the context of JVM Garbage Collection, what role does Metaspace play?

Multiple choiceHardchapter-14-curatedpremiumjvm-architecturemetaspace
Choose one answer
Answer and explanation

Correct answer

A. It is unaffected by garbage collection directly.

Why

Metaspace is not directly affected by garbage collection of heap objects since it uses native memory. However, class unloading can occur during garbage collection cycles, indirectly affecting Metaspace by reclaiming memory from unused class metadata.

Test yourself on JVM Architecture

A free test with instant, explained results. No account needed.

Start free test
All JVM Architecture questions →