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 a static class can contains?
How can you read content from file in java?
Can a boolean be null java?
How Vector class is synchronized,How to build user defined class as synchronized?
Is set ordered?
what is difference between Action messages and Action errors?
Variable of the boolean type is automatically initialized as?
What is the difference between serialization and deserialization?
Are global variables initialized to zero?
difference throws and throw in java
Any one can explain how the inerface uses in java. give with example.
What is the difference in between cpp and java? Can u explain in detail?