Java Tutorial

What is Java

Control Statements

Java Object Class

Java Inheritance

Java Polymorphism

Java Polymorphism

Java Abstraction

Java Encapsulation

Java Array

Java OOPs Misc

Wrapper class in Java

Wrapper class in java provides the mechanism to convert primitive into object and object into primitive.

Since J2SE 5.0, autoboxing and unboxing feature converts primitive into object and object into primitive automatically. The automatic conversion of primitive into object is known as autoboxing and vice-versa unboxing.

The eight classes of java.lang package are known as wrapper classes in java. The list of eight wrapper classes are given below:

Primitive Type Wrapper class
boolean Boolean
char Character
byte Byte
short Short
int Integer
long Long
float Float
double Double

Wrapper class Example: Primitive to Wrapper

Flash Soon


Wrapper class Example: Wrapper to Primitive

Flash Soon


Copyright 2017 Design& Development