Skip to content
Sharp

Java Annotations · interview question

Why do teams use annotations for URL mapping in a mini-framework in production code?

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

Correct answer

D. Annotations enable declarative and centralized route definitions

Why

Annotations offer a declarative way to define URL mappings, which centralizes management, making the system easier to understand and modify. They eliminate the need for scattered configuration files, leading to cleaner and more maintainable code.

Test yourself on Java Annotations

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

Start free test
All Java Annotations questions →