Integer.toString(int i, int radix) has the following syntax.
public static String toString(int i, int radix)
In the following code shows how to use Integer.toString(int i, int radix) method.
public class Main{ public static void main(String[] args) { System.out.println(Integer.toString(100,2)); System.out.println(Integer.toString(100,8)); System.out.println(Integer.toString(100,10)); System.out.println(Integer.toString(100,16)); } }
The code above generates the following result.