Skip to content
Sharp

Reflection API · interview question

When is runtime scanning with reflection still a good fit?

Multiple choiceMediumchapter-16-curatedpremiumreflection-apidynamic-class-loading
Choose one answer
Answer and explanation

Correct answer

D. When the framework must discover components from the actual runtime classpath or plugin set

Why

Reflection remains valuable for plugin-like or classpath-driven discovery because the framework can inspect what is actually present when the application starts. That flexibility is the tradeoff for extra runtime work.

Test yourself on Reflection API

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

Start free test
All Reflection API questions →