Skip to content
Sharp

Java Annotations · interview question

Which tool is commonly used for generating code at compile-time in Java?

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

Correct answer

A. Lombok

Why

Lombok is a popular tool that generates code at compile-time, such as getters, setters, and constructors, by using annotations to reduce boilerplate code in Java applications.

Test yourself on Java Annotations

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

Start free test
All Java Annotations questions →