java.math.BigInteger

来源:互联网 发布:无线路由器mac绑定 编辑:程序博客网 时间:2024/05/23 19:16

nextProbablePrime()函数

package learn.BigInteger;import java.math.BigInteger;;public class BigIntegerDemo{    public static void main(String[] args)    {        BigInteger big=BigInteger.ONE;        System.out.println("BigInteger.ONE"+big);        /**         * nextProbablePrime()返回刚好大于参数的质数         */        System.out.println("nextProbablePrime"+big.nextProbablePrime());        System.out.println("nextProbablePrime"+big.nextProbablePrime());        big=BigInteger.TEN;        System.out.println("BigInteger.TEN:"+big);        big=BigInteger.ZERO;        System.out.println("BigInteger.ZERO:"+big);    }}