Skip to content
Sharp

Reflection API · interview question

In what scenario might Reflection be necessary despite its performance overhead?

Multiple choiceMediumchapter-16-curatedpremiumreflection-apibreaking-encapsulation
Choose one answer
Answer and explanation

Correct answer

B. Building a dynamic proxy for method interception

Why

Reflection is necessary when building dynamic proxies for method interception, such as in AOP or when implementing interface-based proxies, despite its performance overhead.

Test yourself on Reflection API

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

Start free test
All Reflection API questions →