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 immutable state?
What are loops in java?
What is difference between array and arraylist in java?
What are the changes in java.io in java 8 ?
What is meant by event handling in SAX parser?
What happens if an exception is throws from an object's constructor?
Which object oriented concept is achieved by using overloading and overriding?
What state is a thread in when it is executing?
Are floats faster than doubles?
Can you change array size in java?
Define class?
What are pass by reference and pass by value?