Skip to content
Sharp

Reflection API · interview question

How can reflection be used to call a method with a signature that has changed dynamically?

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

Correct answer

B. Use MethodHandles

Why

MethodHandles can be used to handle dynamic method invocations, offering more flexibility and performance than traditional reflection for complex scenarios.

Test yourself on Reflection API

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

Start free test
All Reflection API questions →