Online Java Compiler By
JavaTpoint.com
public class IntegerToStringExample4 { public static void main(String[] args) { //Returns a string representation of the specified integer with radix 10 String returnval1 = Integer.toString(65, 10); System.out.println("String Value = " + returnval1); //Returns a string representation of the specified integer with radix 16 String returnval2 = Integer.toString(65, 16); System.out.println("String Value = " + returnval2); //Returns a string representation of the specified integer with radix 8 String returnval3 = Integer.toString(65, 8); System.out.println("String Value = " + returnval3); //Returns a string representation of the specified integer with radix 2 String returnval4 = Integer.toString(65, 2); System.out.println("String Value = " + returnval4); } }
Output