next up previous
Next: Reading of numbers of Up: Unit 04 Previous: Methods that modify variables

Wrapper classes for the primitive data types

In fact, Java already provides so-called wrapper classes for the primitive data types. Each primitive data type has an associated class, that typically has the same name as the data type, but starts with a capital letter (except for int and char, where the name of the wrapper class is different):

Primitive data type Corresponding wrapper class
byte Byte
short Short
int Integer
long Long
float Float
double Double
char Character
boolean Boolean


next up previous
Next: Reading of numbers of Up: Unit 04 Previous: Methods that modify variables