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 a Wrapper class?

Answer Posted / darshan

A primitive wrapper class in the Java programming language
is one of eight classes provided in the java.lang package to
provide object methods for the eight primitive types. All of
the primitive wrapper classes in Java are immutable. J2SE
5.0 introduced autoboxing of primitive types into their
wrapper object, and automatic unboxing of the wrapper
objects into their primitive value—the implicit conversion
between the wrapper objects and primitive values.

Wrapper classes are used to represent primitive values when
an Object is required. The wrapper classes are used
extensively with Collection classes in the java.util package
and with the classes in the java.lang.reflect reflection
package.

The primitive wrapper classes and their corresponding
primitive types are:

Primitive type Wrapper class Constructor Arguments
byte Byte byte or String
short Short short or String
int Integer int or String
long Long long or String
float Float float, double or String
double Double double or String
char Character char
boolean Boolean boolean or String

The Byte, Short, Integer, Long, Float, and Double wrapper
classes are all subclasses of the Number class.

Is This Answer Correct ?    27 Yes 10 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is meant by object oriented programming – oop?

1045


Who is founder of java?

1036


Explain about instanceof operator in java?

1115


Which container method is used to cause a container to be laid out and redisplayed in java programming?

1170


How will you add panel to a frame?

1163


What is the purpose of a transient variable?

1117


What is class forname?

1090


What is the difference between compare and compareto in java?

1101


Is it necessary for the port addresses to be unique? Explain with reason.

1056


What is your platform?s default character encoding and how to know this?

2413


What must a class do to implement an interface in java programming?

1127


What design pattern you have used in your project? I answered Factory pattern, how it is implemented? What are its advantage? Do know about Abstract Factory?

2548


What is the exact difference in between unicast and multicast object? Where we will use?

1041


What is balanced tree in java?

1014


What do you understand by the term string pool?

1065