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 ?
|
Banned
|
|
| 17Dec2007,16:35 | #1 |
|
Last edited by shabbir; 17Dec2007 at 17:21.. Reason: Confine links to signature |
|
Go4Expert Member
|
|
| 16Jan2008,11:20 | #2 |
|
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 Integer i=10; Double d=10.5; you don't need to write any object creation code Eg. Double d=new double(); |
