AdvancedJava

Annotation - it annotates the java element, for example @Overwrite, an annotation indicates that the declared element should be processed in some special way by compiler. you can define own annotation type.

  1. annotation can be used to auto generate code, for example, XDoclet can generate EJB interfaces and deployment descriptor.

  2. annotation can be used to produce warning during compiler time

  3. annotation can also be used to log and analyze data before entering method during run time.