Get the scoop on typesafe enums and learn how to use them properly in
switchstatements, then get started with Java annotations and meta-annotations types like
Target, which you can use to clarify the purpose and function of annotations in your Java code.
The first article in my Java language evolution tour introduced assertions and generics, concluding with a discussion about why the generics suite was a particularly controversial addition to Java 5. Here I introduce typesafe enums and annotations, two more Java 5 language features designed to enhance the safety and productivity of Java programs.