what is auto boxing

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are 3 data types?

536


Is constructor inherited?

524


Variable of the boolean type is automatically initialized as?

586


What is the use of coding?

515


How you can force the garbage collection?

533






Is a method a function?

541


Is main is a keyword?

570


What is the final access modifier in java?

608


Does windows 10 need java?

588


What is the purpose class.forname method?

550


What is an class?

583


What is a flag value?

510


How can you say java is object oriented?

583


What is the difference between a window and a frame in java programming?

587


What is supplier in java?

543