There are three types of annotations.

  1. Marker Annotation - annotation that has no method
@interface CustomAnnotation {}
  1. Single-Value Annotation - annotation that has one method
@interface CustomAnnotation {  
    int value();  
}
  1. Multi-Value Annotation - annotation that has more than one method
@interface CustomAnnotation{  
    int value1();  
    String value2();  
    String value3();  
}