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

give me the answer of this code class A extnds String This code we can write r not in Java? Explain?

4 Answers  


Explain about anonymous inner classes in java?

0 Answers  


List some oops concepts in java?

0 Answers  


What is skeleton and stub? What is the purpose of those?

0 Answers  


Can we have any other return type than void for main method?

0 Answers  






Which class should you use to obtain design information about an object in java programming?

0 Answers  


Why do we use string?

0 Answers  


Explain differences between collection api and stream api?

0 Answers  


What is overloading and overriding in java?

0 Answers  


Do you know why doesn't the java library use a randomized version of quicksort?

0 Answers  


Name and explain the types of ways which are used to pass arguments in any function in java.

0 Answers  


what is multitherading

3 Answers   Tech Mahindra,


Categories