BigInteger: probablePrime(int bitLength, Random rnd) : BigInteger « java.math « Java by API






BigInteger: probablePrime(int bitLength, Random rnd)

   
import java.math.BigInteger;
import java.security.SecureRandom;
import java.util.Random;

/*

 */
public class MainClass {
  public static void main(String[] unused) {
    Random prng = new SecureRandom();  // self-seeding
    System.out.println(BigInteger.probablePrime(10, prng));
    }
 

}

           
         
    
    
  








Related examples in the same category

1.BigInteger.TEN
2.new BigInteger(byte[] val)
3.new BigInteger(String val)
4.new BigInteger(String val, int radix)
5.new BigInteger(int bitLength, int certainty, Random rnd)
6.BigInteger: add(BigInteger val)
7.BigInteger: andNot(BigInteger val)
8.BigInteger: bitLength()
9.BigInteger: clearBit(int n)
10.BigInteger: divide(BigInteger val)
11.BigInteger: doubleValue()
12.BigInteger: flipBit(int n)
13.BigInteger: isProbablePrime(int certainty)
14.BigInteger: modPow(BigInteger exponent, BigInteger m)
15.BigInteger: multiply(BigInteger val)
16.BigInteger: negate()
17.BigInteger: not()
18.BigInteger: or(BigInteger val)
19.BigInteger: pow(int exponent)
20.BigInteger: setBit(int n)
21.BigInteger: shiftLeft(int n)
22.BigInteger: shiftRight(int n)
23.BigInteger: subtract(BigInteger val)
24.BigInteger: testBit(int n)
25.BigInteger: toByteArray()
26.BigInteger: toString()
27.BigInteger: toString(int radix)
28.BigInteger: valueOf(long val)
29.BigInteger: xor(BigInteger val)