Boxing (computer programming): Difference between revisions

Content deleted Content added
Autoboxing: The compiler automatically supplies the extra code needed to perfrom the type conversion.
Unboxing: not exactly the same: see Sun's article on Generics
Line 35:
int k = i + j;
 
As of J2SE 5.0, the first example is now treated just like the second example. The <code>Integer</code> is unboxed into an <code>int</code>, the two are added, and then the sum is autoboxed into a new <code>Integer</code>. [http://java.sun.com/j2se/1.5.0/docs/guide/language/generics.html]
 
[[Category:Data types]]