Check out example codes for "marker annotations in java". It will help you in understanding the concepts better.

Code Example 1

/*The only purpose is to mark a declaration.
These annotations contain no members and do not consist any data. 
Thus, its presence as an annotation is sufficient. 
Since, marker interface contains no members, simply determining whether it is present or absent is sufficient. 

@Override is an example of Marker Annotation.

Example: - */

@TestAnnotation()

Learn ReactJs, React Native from akashmittal.com