1 min read

To make java fully object-oriented, wrapper Class was introduced.
It is used to convert a primitive data type into an object and vice versa.

A wrapper class is divided into two categories:

  • Autoboxing,that converts primitive data type to object.
  • Unboxing, that converts object to primitive data type.

Eight classes of java.lang package are known as wrapper class in java.

Primitive typeWrapper class
boolean Boolean
byte Byte
int Integer
float Float


 class wrapper
 public static void main(String[] args)
 int i=10;
 Integer a=Integer.valueof(i);
 //Integer a=i;   JVM will internally add "Integer.valueof(i);
 Integer x=new Integer(10);//object of wrapper class
 int y=x.intvalue();

Categories: Uncategorized


I am a loving person with helping nature.Quite introvert but love to express myself to loved ones.Big fan of Army and Mahadev ,yeah I am religious , interested in spirituality and yoga is the ultimate goal.I like to explore new places ,love to ride on adventures ,want to live in every moment and feel every second of life.


Leave a Reply