what is auto boxing
Answers were Sorted based on User's Feedback
Answer / vijay, hangar17
Auto boxing is introduced in jdk1.5
Automatic conversion from int to Integer is Auto boxing and
automatic conversion back from Integer to int is auto unboxing.
For example
int i;
Integer a
//Manual conversion
i = a.intValue();
a = new Integer(i);
By Auto boxing
i=a;
a=i;
| Is This Answer Correct ? | 43 Yes | 2 No |
Answer / narayanarao
Automatic conversion from int to Integer is Auto boxing and
automatic conversion back from Integer to int is auto unboxing.
For example
int i;
Integer a
//Manual conversion
i = a.intValue();
a = new Integer(i);
By Auto boxing
i=a;
a=i;
| Is This Answer Correct ? | 10 Yes | 4 No |
What is a nonetype?
What is a java string?
What is the covariant return type?
Why string is a class?
Which collection is ordered in java?
What is integer size in java?
Can we sort hashset in java?
What is the byte order of byte buffer?
Why are variables important in research?
which method throws exception of type Throwable
What is the difference between equals() and?
Can we assign null to double in java?