Note that the coming
Java 1.5 compilers will have a feature known as auto-boxing and auto-unboxing. Primitives won't be cast to objects, but in certain circumstances, the compiler will wrap a primitive up using the appropriate wrapper class, and unwrap wrapper class instances into the appropriate primitive values.