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 |
why there are multiple catches for a try block.don't tell me that there can be multiple exception of a code segment that's why.tell me the real fact behind this.
Which is the best approach for creating thread ?
How many bits is a char?
Is string serializable in java?
How many objects are created for a singleton class
How to sort an unsorted array in java?
What is mean by encoding?
Difference between Interface & Abstract class?
What does it mean that strings are immutable?
Can a list be null in java?
Is void a data type in java?
Write a function to find out longest palindrome in a given string?