Skip to content
Sharp

Java Annotations · interview question

In the context of a mini-framework, why is reflection useful when working with annotations?

Multiple choiceMediumchapter-16-curatedpremiumjava-annotationscustom-annotations
Choose one answer
Answer and explanation

Correct answer

D. Reflection enables runtime inspection and dynamic behavior application

Why

Reflection is useful in a mini-framework for inspecting annotations at runtime and applying behaviors dynamically. This allows the framework to be configured through annotations, leading to more flexible and adaptable code.

Test yourself on Java Annotations

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

Start free test
All Java Annotations questions →