What does autoboxing and unboxing mean?

John Zukowski

Autoboxing is not casting. Instead, it is the automatic conversion of a primitive data type to its wrapped Object type (boxing) and back (unboxing). For instance, Integer i = 3;, used to generate a compile-time error, now it doesn't, automatically converting the int type 3 to an Integer.

0 Comments  (click to add your comment)
Comment and Contribute






(Maximum characters: 1200). You have 1200 characters left.