Skip to content
Sharp

Java Annotations · interview question

Why does the Annotation Processor in Java matter in this design?

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

Correct answer

A. To generate additional source code during compilation

Why

Annotation Processors are used to process annotations at compile time, often generating additional source files or other resources. This is a powerful feature used by libraries like Lombok to reduce boilerplate code.

Test yourself on Java Annotations

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

Start free test
All Java Annotations questions →