Wrapper class is a wrapper around a primitive data type. It represents primitive data types in their corresponding class instances e.g. a boolean data type can be represented as a Boolean class instance. All of the primitive wrapper classes in Java are immutable i.e. once assigned a value to a wrapper class instance cannot be changed further.
Wrapper Classes are used broadly with Collection classes in the java.util package and with the classes in the java.lang.reflect reflection package.
* one for each primitive type: Boolean, Byte, Character, Double, Float, Integer, Long, and Short * Byte, Double, Float, Integer and Short extend the abstract Number class * all are public final ie cannot be extended * get around limitations of primitive types * allow objects to be created from primitive types *)all, except Character, have a valueOf(String s) method which is equivalent to new Type(String s) *)all the classes override equals(), hashCode() and toString() in Object * equals() returns true if the values of the compared objects are the same * hashCode() returns the same hashcode for objects of the same type having the same value * toString() returns the string representation of the objects value
For more information,Tutorial and Examples on Wrapper Class visit to :