Skip to content
Sharp

Performance Tuning · interview question

What role does Metaspace play in Java's memory model?

Multiple choiceHardchapter-14-curatedpremiumperformance-tuningoutofmemoryerrors
Choose one answer
Answer and explanation

Correct answer

C. Stores class metadata outside the Heap.

Why

Metaspace stores class metadata in Java and is allocated outside the traditional heap. Unlike the PermGen space it replaced, Metaspace can grow dynamically, thus reducing the likelihood of OutOfMemoryError related to class loading.

Test yourself on Performance Tuning

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

Start free test
All Performance Tuning questions →