Skip to main content

Convert Integer to Java String object

CODING:
public class IntegerToStringExample
{
  public static void main(String[] args)
{
    Integer intObj = new Integer(10);
    String str = intObj.toString();
    System.out.println("Integer converted to String as " + str);
  }
}

CODING:

Output of the program would be
Integer converted to String as 10


Comments