Shared posts

20 Feb 16:30

Java 101: The next generation: The essential Java language features tour, Part 2

by Jeff Friesen

Get the scoop on typesafe enums and learn how to use them properly in switch statements, 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.

To read this article in full or to leave a comment, please click here