Wrapper class

Wrapper Class:

Wrapper classes are used to convert the string format to appropriate primitive datatypes.
Wrapper classes
Constants Wrapper Class Datatype Method
Integer Byte byte x=Byte.parseByte(args[0])
Short short x=Short.parseShort(args[0])
Integer int x=Integer.parseInt(args[0])
Long long x=Long.parseLong(args[0])
Floating point Float float x=Float.parseFloat(args[0])
Double double x=Double.parseDouble(args[0])
Character Character char x=args[0].charAt(0)
String String String x=args[0]
class Addition
{
 public static void main(String arr[])
 {
  int x,y;
  System.out.println("Before converting "+(arr[0]+arr[1]));
  x=Integer.parseInt(arr[0]);
  y=Integer.parseInt(arr[1]);
  System.out.println("Addition values is "+(x+y));
 }
}

OUTPUT:
    Java Addition 12 12
    Before Converting 1212
    Addition Values Is 24