can anyone explain me the concept of autoboxing?

Answer Posted / jitu

In case of autoboxing directly the value of the constructor
assign to a variable.i.e object of wrapper class directly
assign to a variable.but it is only possible in case of 1.5
version.
Ex:public class X
{public static void main(String a[])
{Integer i1=new Integer("20");
Integer i2=new Integer("20");
int m1=i1;
int m2=i2;
S.o.p(m1+m2);o/p-20

Is This Answer Correct ?    3 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain with example the concept of constant variable in java.

640


How we can make copy of a java object?

659


What are the java ide’s?

577


what is method reference in java 8?

560


What are three types of loops in java?

592






Explain about class in java?

614


How are destructors defined in java?

579


Does java map allow duplicates?

499


Do I need java for windows 10?

555


Why we cannot override static method?

565


What are peerless components in java programming?

587


What does int argc char * argv [] mean?

523


What is the use of private static?

539


Does a function need a return?

535


Explain the difference between protected and default access.

520