Java Annotations
Annotation has been a part of the core Java API from JDK5 onwards. Annotation means adding comments or instructions into the Java code so that the compiler provides a special treatment to the designated element. This feature, when incorporated appropriately, can leverage productivity by reducing bugs in the code. Annotation instructs the compiler to enforce some specific rules. These rules, if violated, crop compiler time errors. Errors are better managed if they surface during compilation simply because error messages often…