Skip to content
Sharp

Reflection API · interview question

What does a MethodType represent when working with MethodHandles?

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

Correct answer

D. A representation of method signature.

Why

MethodType represents the signature of a method, including the return type and the types of its parameters, which is essential for ensuring compatibility when invoking methods with MethodHandles.

Test yourself on Reflection API

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

Start free test
All Reflection API questions →