what is autoboxing in Java 1.5 ?
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
Re: what is autoboxing in Java 1.5 ?
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();
|All times are GMT +5.5. The time now is 18:52.|