Wrapper classes are used to represent primitive values when an Object is required. The wrapper classes are used extensively with Collection classes in the java.util package and with the classes in the java.lang.reflect reflection package.

Wrapper classes has the following features :

 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 i.e. cannot be extended. Get around limitations of primitive types. Allow objects to be created from primitive types.

 All the classes have two constructor forms :

 a constructor that takes the primitive type and creates an object eg Character(char), Integer(int).
 a constructor that converts a String into an object eg Integer("1"). Throws a NumberFormatException if the String cannot be converted to a number.
Designed By Blogger Templates | Templatelib & Distributed By Blogspot Templates