what is auto boxing

Answers were Sorted based on User's Feedback



what is auto boxing..

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

what is auto boxing..

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 auto boxing..

Answer / uttam

the above one is correct

Is This Answer Correct ?    0 Yes 1 No

Post New Answer

More Core Java Interview Questions

Differentiate jar and war files?

0 Answers  


What’s meant by anonymous class?

0 Answers  


What is a ternary operator in java?

0 Answers  


What are the advantages of inner classes?

0 Answers  


Explain about sets?

0 Answers  






suppose we have an interface & that interface contains five methods. if a class implements that interface then we have to bound that to give tha definition of all five methods in that class. If we declare that class as abstract then can we call only two methods to give the deinition of that method & i don't want to give the definition of all the methods? can it possible

6 Answers   HP, Wipro,


What is method overloading in java ?

0 Answers  


What are advantages of using Java?s layout managers than windowing systems?

0 Answers  


What is arguments in java?

0 Answers  


Is oracle java 11 free?

0 Answers  


How to sort an array in java without using sort method?

0 Answers  


class A{ some variables; public void a()throws Excepion1,Exception2{....} } class B extends A{ variables... public void a()throws E2,E3{.....} } Qns: here override of methods occurs or not,ore else wil give any compilation error or run properly..plz tell me briefly whts happening with the above codes....

4 Answers   Quinnox,


Categories