Boxing (computer programming): Difference between revisions

Content deleted Content added
clarifying comma
Matt Crypto (talk | contribs)
m "by the computer" is not needed
Line 15:
For example, as of J2SE 5.0, Java will now allow you to create a <code>LinkedList</code> of <code>int</code>s. This does not contradict what was said above: The <code>LinkedList</code> still only lists objects, and it cannot list primitive types. But now, when Java expects an object but receives a primitive type, it immediately converts that primitive type to an object.
 
This action is called autoboxing, because it is boxing that is done automatically (and implicitly) by the computer, instead of requiring you to do it yourself.
 
===Unboxing===