Convert integer to string

String toString()
Returns a String object representing this Integer's value.
static String toString(int i)
Returns a String object representing the specified integer.
static String toString(int i, int radix)
Returns a string representation of the first argument in the radix specified by the second argument.

public class Main {
  public static void main(String[] args) {

    System.out.println(Integer.toString(10));

  }
}

The output:


10

To indicate the radix:


public class Main {
  public static void main(String[] args) {

    System.out.println(Integer.toString(10, 8));

  }
}

The output:


12
Home 
  Java Book 
    Essential Classes  

Integer:
  1. Integer class
  2. Max, min value of an integer type variable
  3. Create Integer using its constructors
  4. Return an integer value as byte, double, float, int, long and short
  5. Compare two integer values
  6. Decode a string and return an integer value
  7. Convert string to integer
  8. Convert integer to string
  9. Reverse and rotate the integer in binary format
  10. Bit oriented operation
  11. Return system property as integer
  12. Get the leading and trailing zeros
  13. Get the sign of an Integer
  14. Convert integer to binary, hexdecimal and octal format