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 is a “stateless” protocol ?

563


What is tochararray in java?

506


What is an error in java?

643


What is the technique adopted to create an immutable class?

526


What is the difference between Java1.4 and Java1.5

1834






What will be the default values of all the elements of an array defined as an instance variable?

562


how to write a server program and sending the mails to the server using smtp protocol please help me

1555


Is finalize() similar to a destructor?

556


What type of variable is error flag?

595


What classes of exceptions may be caught by a catch clause in java programming?

709


If a class is declared without any access modifiers, where may the class be accessed in java programming?

663


How does java enable high performance?

696


What are different types of arrays?

539


What is scope of a variable?

607


What is the point of java?

560