This allows annotations to be retained by the Java virtual machine at run-time and read via reflection.
[3] The Java platform has various ad-hoc annotation mechanisms—for example, the transient modifier, or the @Deprecated javadoc tag.
[4] Annotations became available in the language itself beginning with version 1.5 of the Java Development Kit (JDK).
If the @Override annotation were absent, a new method of name gettype() would be created in class Cat.
Annotations are often used by frameworks as a way of conveniently applying behaviours to user-defined classes and methods that must otherwise be declared in an external source (such as an XML configuration file) or programmatically (with API calls).
Rather, the class object is passed to the JPA implementation at run-time, which then extracts the annotations to generate an object–relational mapping.
Processors can produce informational messages or create additional Java source files or resources, which in turn may be compiled and processed.
The implementations of this interface are used to represent an annotated element of the program currently running in the Java Virtual Machine.