O'Reilly logo

Java 7: A Beginner's Tutorial (Third Edition) by Budi Kurniawan

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 18

Annotations

Annotations are notes in Java programs to instruct the Java compiler to do something. You can annotate any program elements, including Java packages, classes, constructors, fields, methods, parameters, and local variables. Java annotations were first defined in JSR 175, “A Metadata Facility for the Java Programming Language.” Later JSR 250, “Common Annotations for the Java Platform” added annotations for common concepts. Both specifications can be downloaded from http://www.jcp.org.

This chapter starts with an overview of annotations, and then teaches you how to use the standard and common annotations. It concludes with a discussion of how to write your own custom annotation types.

An Overview of Annotations

Annotations ...

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