Skip to content
Sharp

Reflection API · interview question

Which access level for MethodHandle objects created using MethodHandles.publicLookup() is the default in Java?

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

Correct answer

C. Public only

Why

MethodHandles.publicLookup() creates MethodHandle objects that can only access public members of classes, maintaining consistency with standard Java access control rules.

Test yourself on Reflection API

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

Start free test
All Reflection API questions →