Wrapper classes โwrapโ primitive data types into objects (useful for collections, null handling, etc.)
Primitive Wrapper Class
byte Byte
short Short
int Integer
long Long
float Float
double Double
char Character
boolean Boolean
Example:
int age = 10;
Integer age1 = Integer.valueOf(age); // boxing
๐งฉ Memory tip:
โWrapper = gift box for primitiveโ ๐
Top comments (0)