Skip to content
Sharp

Reflection API · interview question

How does Java's reflection API impact type safety?

Multiple choiceMediumchapter-16-curatedpremiumreflection-apimethod-invoke
Choose one answer
Answer and explanation

Correct answer

D. It bypasses compile-time type checking

Why

Reflection bypasses compile-time type safety checks, meaning errors that could be caught during compilation might only be detected at runtime.

Test yourself on Reflection API

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

Start free test
All Reflection API questions →