Online Java Compiler By
JavaTpoint.com
import java.math.BigInteger; public class BigIntegerToStringExample4 { public static void main(String[] args) { // create a BigInteger object BigInteger big1; // create a String objects String str; // assign a value to big1 big1 = new BigInteger("255"); // assign String value of big1 to str in radix str = big1.toString(9); System.out.println("String representation of "+big1+" in radix 9 is "+str); } }
Output