Generics in Java

by Eric M. Burke

Related link: http://www.ociweb.com/jnb/jnbJul2003.html



Check out this introduction to Java Generics, a new language feature coming in Java 1.5. Rob Smith is a fellow consultant with OCI, the company I work for. I reviewed his article before he published it. Highlights:

  • generics syntax

  • autoboxing/unboxing

  • using generics with the collections API

  • covariant return types


I really enjoyed the article because it provided a quick overview of this new Java feature with enough technical "meat" to make it worthwhile. For example, I was not aware that Sun was moving forward with covariant return types until seeing Rob's examples. I'm also really pleased with the clean syntax possible with boxing/unboxing of primitives.