Wednesday, April 27, 2011

What are annotations in java

Annotations are notes in Java programs to instruct the Java compiler to do something. Java provides three standard annotations and four standard meta-annotations.
  1. An annotation type is a special interface type.
  2. An annotation is an instance of an annotation type.
  3. An annotation type has a name and members.
  4. The information contained in an annotation takes the form of key/value pairs.
  5. There can be zero or multiple pairs and each key has a specific type.
  6. It can be a String, int, or other Java types.

No comments:

Post a Comment

Chitika