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