Wrapper classes in Java

Wrapper Classes are used to convert from primitive data types to objects or vice versa Example

int age = Integer.parseInt("15");//Please note that the arguments passed should actually be nos others an error will be thrown.

Wrapper Classes are also used because sometimes some functions only accepts objects and not primitive data type like in the below example test method only accepts objects.

int i = 10;
test(i);//not possible

Integer in = new Integer(i);
test(in);//possible

void test(Object o){
}