This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
What don't you understand? Annotations are simply a way to specify metadata through Java rather than something like XML. The first bit of code you show defines an annotation and its attributes.
The second part is how you use said annotation, although specifying an annotation on a main method is probably an odd example. In fact your entire example probably makes it more difficult to understand.
Additionally an annotation is useless without the code to process it. So by itself an annotation does nothing. Using the reflection API you can inspect classes and methods and determine what annotations exist. At that time is the work actually done. [ November 29, 2008: Message edited by: Gregg Bolinger ]