can u tell
Printable View
can u tell
AutoBoxing means Conversion of Primitive to Wrapper Object automatically.
this concept is newly added in java5.0.
[QUOTE=pavang;12478]can u tell[/QUOTE]
As any java programmer knows that we cann't put a primitive values(int,floatetc.) into collection.Collection can hold only object references,so you have to box primitive values into the appropriate wrapper classes( Integer,Float etc.).When you take the object out of the collection, you get the Integer that you put in; if you need an int, you must unbox the Integer using the intValue method. this boxing and unboxing is a pain,and clutters up your code.tHe Autoboxing and Unboxing feature automates the process.