Java String.valueOf()


Java String.valueOf()

public class Sample {

   public static void main(String args[]){

      int i = 200;

      float f = 12.0f;

      char c = 's';

      char[] ch = {'h', 'e', 'l', 'l', 'o'};

      String data = String.valueOf(i);

      System.out.println(String.valueOf(i));

      System.out.println(String.valueOf(f));

      System.out.println(String.valueOf(c));

      System.out.println(String.valueOf(ch));

   }

}