Java Data Type Tutorial - Java BigInteger(String val, int radix) Constructor








Syntax

BigInteger(String val, int radix) constructor from BigInteger has the following syntax.

public BigInteger(String val,   int radix)

Example

In the following code shows how to use BigInteger.BigInteger(String val, int radix) constructor.

import java.math.BigInteger;

public class Main {
  public static void main(String[] argv) throws Exception {
    BigInteger bi = new BigInteger("4407760", 8);
    System.out.println(bi);
  }
}

The code above generates the following result.