BigInteger.this

Constructs a randomly generated positive BigInteger that is probably prime, with the specified bitLength.

@apiNote It is recommended that the {@link #probablePrime probablePrime} method be used in preference to this constructor unless there is a compelling need to specify a certainty.

@param bitLength bitLength of the returned BigInteger. @param certainty a measure of the uncertainty that the caller is willing to tolerate. The probability that the new BigInteger represents a prime number will exceed (1 - 1/2<sup>{@code certainty}</sup>). The execution time of this constructor is proportional to the value of this parameter. @param rnd source of random bits used to select candidates to be tested for primality. @throws ArithmeticException {@code bitLength < 2} or {@code bitLength} is too large. @see #bitLength()

Meta