Java Data Type Tutorial - Java BigInteger(int signum, byte[] magnitude) Constructor








Syntax

BigInteger(int signum, byte[] magnitude) constructor from BigInteger has the following syntax.

public BigInteger(int signum,   byte[] magnitude)

Example

In the following code shows how to use BigInteger.BigInteger(int signum, byte[] magnitude) constructor.

//from  w  w  w  .jav  a2s . co m
import java.math.BigInteger;

public class Main {
  public static void main(String[] args) throws Exception {

    BigInteger mod = new BigInteger(2,new byte[]{1,2,3,4,5,6,7,8,9});
   
    System.out.println(mod);
  }
}

The code above generates the following result.