BigInteger.toString() has the following syntax.
public String toString()
In the following code shows how to use BigInteger.toString() method.
//from w w w.j a v a2 s . c o m import java.math.BigInteger; public class Main { public static void main(String[] args) { BigInteger bi1 = new BigInteger("1234"); BigInteger bi2 = new BigInteger("-1234"); System.out.println(bi1.toString()); System.out.println(bi2.toString()); } }
The code above generates the following result.