Skip to content
Sharp

Java Annotations · interview question

Which Java API allows you to dynamically invoke methods on objects?

Multiple choiceMediumchapter-16-curatedpremiumjava-annotationsannotation-processors
Choose one answer
Answer and explanation

Correct answer

B. Method.invoke()

Why

Method.invoke() is part of the reflection API and allows you to dynamically invoke a method on a given object, enabling runtime flexibility.

Test yourself on Java Annotations

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

Start free test
All Java Annotations questions →