Create BigInteger - Java java.math

Java examples for java.math:BigInteger

Description

Create BigInteger

Demo Code

import java.util.Scanner;
import java.math.BigInteger;

public class LoveWithBigInteger {

    public static void main(String cLA[]) {

        BigInteger aBigNumber;//from ww w.ja va 2s.  c o  m

        aBigNumber = BigInteger.valueOf(5); // within integer range
        System.out.printf("%d\n", aBigNumber);

        aBigNumber = new BigInteger("1234");
        System.out.println(aBigNumber);
    }
}

Related Tutorials