Online Java Compiler By
JavaTpoint.com
import java.math.BigInteger; public class BigIntegerToStringExample2 { 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("15"); // assign String value of big1 to str in radix str = big1.toString(1); System.out.println("String representation of "+big1+" in radix 1 is "+str); } }
Output