Can you provide an example of the Java autoboxing syntax?
Sure. The sample program that follows shows several examples of the Java 5 autoboxing (and unboxing) capability. First, I created a List of Integers, but then, instead of adding Integer references, I add plain old int primitive types. Next, I get those some elements out and treat them again like Integer objects in a Java 5 for-each loop. Finally, I also show that items in the List can be treated as int primitives by doing some basic math, then printing the result value.