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...

What is the difference between Integer and int?

Answer Posted / devendra

An int is a primitive. It is not an Object.int variables
are mutable. Unless you mark them final, you can change
their value at any time.
An Integer, is a Object that contains a single int
field.Integers are immutable. If you want to affect the
value of a Integer variable, the only way is to create a
new Integer object and discard the old one.

Converting
// to int i from Integer ii
int i = ii.intValue();

// to Integer ii from int i
Integer ii = new Integer( i );

Is This Answer Correct ?    27 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Does constructor creates the object ?

1043


What do you understand by the term string pool?

1013


Describe the Big-O Notation.

1049


What is subsequence of a string?

1100


Which oo concept is achieved by using overloading and overriding?

1014


What is the difference between superclass and subclass?

1178


What is difference between wait and notify in java?

1145


Difference between final and effectively final ?

1110


What is the use of private static?

1052


What is sleep method?

1154


What are the fileinputstream and fileoutputstream?

1068


When parseint method can be used?

955


Explain the usage of this with constructors?

1028


How many bits is a char?

999


What is the map interface in java programming?

1021