O'Reilly logo

The Java® Tutorial: A Short Course on the Basics, 6th Edition by Sharon Biocca Zakhour, Joni Gordon, Sowmya Kannan, Scott Hommel, Raymond Gallardo

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 5. Annotations

Annotations, a form of metadata, provide data about a program that is not part of the program itself. Annotations have no direct effect on the operation of the code they annotate.

Annotations have a number of uses, among them:

Information for the compiler—Annotations can be used by the compiler to detect errors or suppress warnings.

Compile-time and deployment-time processing—Software tools can process annotation information to generate code, XML files, and so forth.

Runtime processing—Some annotations are available to be examined at runtime.

This chapter explains where annotations can be used, how to apply annotations, what predefined annotation types are available in the Java SE Application Programming Interface ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required