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;
//w  w w. j av a  2 s  . c o  m
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.





















Home »
  Java Tutorial »
    java.math »




BigDecimal
BigInteger