Converting primitive wrapper objects to String

The following example shows how to convert objects of primitive wrapper classes to String.

public class PrimitiveWrapperToString {

   public static void main(String[] args) {
     Integer i = new Integer(1);
     Double d = new Double(1.1);
     Float f = new Float(2.2);
     Long l = new Long(13);

     String si = Integer.toString(i);
     String sd = Double.toString(d);
     String sf = Float.toString(f);
     String sl = Long.toString(l);

     System.out.println(si + " " + sd + " " + sf + " " + sl);
  }
}
Technologies: 
Actions: