Skip to content
Sharp

Reflection API · interview question

How would you explain a key advantage of using MethodHandles over the traditional reflection method invocation in a Java interview?

Multiple choiceEasychapter-16-curatedpremiumreflection-apimethodhandles
Choose one answer
Answer and explanation

Correct answer

B. MethodHandles provide better performance.

Why

MethodHandles offer a performance advantage because they are designed to be as close to the performance of native code execution as possible, reducing the overhead associated with reflective method calls.

Test yourself on Reflection API

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

Start free test
All Reflection API questions →