what is autoboxing in Java 1.5 ?.
Hi I came across the word that is introduced in java1.5 : AutoBoxing
can anybody tell what is autoboxing in detail.
Thanks in Advance
what is autoboxing in Java 1.5 ?
Last edited by shabbir; 17Dec2007 at 17:21.. Reason: Confine links to signature
Java provide equivalent class types for primitive types.
int - Integer
double - Double etc...
These classes are called wrapper classes, because they are wrapping the primitive values.
Before java 1.5 to wrap a primitive value there are workarounds.
From java 1.5 it is automated. That is why this is called autoboxing.
from java 1.5 we can write
you don't need to write any object creation code
Eg. Double d=new double();