Thursday, December 2, 2010

what are the wrapper class and what is their purpose in java???

Wrapper classes: Every primitive type has a corresponding class defined in the Java API class
library. This class is sometimes called a wrapper class. These classes are mostly used for parsing of some string into primitive data type.(primitive data type=int,float,char,double,long,byte,short,boolean)
listed below are data type and their wrapper classes.
Primitive Type                           Wrapper Class
int                                                 Integer
short                                             Short
long                                              Long
byte                                              Byte
float                                             Float
double                                         Double
char                                           Character
Boolean                                     Boolean

No comments:

Post a Comment