Skip to content
Sharp

JVM Architecture · interview question

What potential problem might arise from heavy use of dynamic proxies in a Java application?

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

Correct answer

C. Increased Metaspace usage leading to an OutOfMemoryError

Why

Dynamic proxies generate new classes at runtime, which increases the amount of metadata stored in Metaspace. If this usage is excessive, it can lead to an OutOfMemoryError if Metaspace cannot grow quickly enough to accommodate the new class definitions.

Test yourself on JVM Architecture

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

Start free test
All JVM Architecture questions →