One of the coolest new features in J2SE 5.0 (formerly known as Java 1.5) (what's new) is generics (tutorial) (aka JSR 14). The killer app for generics is the problem of making sure that a Collection is homogeneous and having to downcast each element as its accessed from a collection.
There is a new article in the Java technology zone about generics, Java theory and practice: Generics gotchas, that teaches you how to use generics. There is also a tutorial, Introduction to generic types in JDK 5.0.
Generics are not yet part of J2EE, but will be part of J2EE 5.0 (aka JSR 244) (Java 5 hype from Sun).