Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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

Which of the following classes will have more memory allocated?

1017


What are the parts of a method?

982


does java support pointers?

996


State the difference between strings and arrays.

1248


Give any two differences between C++ and java.

1148


What is json parser in java?

1059


Write a program to show whether a graph is a tree or not using adjacency matrix.

1098


What is anagram word?

997


What is regex in java?

950


What is a method in java?

1051


Define a java class.

1447


How finally used under exception handling?

948


What is file in java?

1034


Can a class extends itself in java?

1026


Why do we need variables?

988