Uses of Class
java.util.Random

Packages that use Random
Package Description
java.math  
java.security
Extensible cryptographic service provider infrastructure (SPI) for using and defining services such as Certificates, Keys, KeyStores, MessageDigests, and Signatures.
java.util  
java.util.concurrent
Utility classes commonly useful in concurrent programming.
  • Uses of Random in java.math

    Methods in java.math with parameters of type Random
    Modifier and Type Method Description
    static BigInteger BigInteger.probablePrime​(int bitLength, Random random)
    Returns a random positive BigInteger instance in the range [0, pow(2, bitLength)-1] which is probably prime.
    Constructors in java.math with parameters of type Random
    Constructor Description
    BigInteger​(int bitLength, int certainty, Random random)
    Constructs a random BigInteger instance in the range [0, pow(2, bitLength)-1] which is probably prime.
    BigInteger​(int numBits, Random random)
    Constructs a random non-negative BigInteger instance in the range [0, pow(2, numBits)-1].
  • Uses of Random in java.security

    Subclasses of Random in java.security
    Modifier and Type Class Description
    class  SecureRandom
    This class generates cryptographically secure pseudo-random numbers.
  • Uses of Random in java.util

    Methods in java.util with parameters of type Random
    Modifier and Type Method Description
    static void Collections.shuffle​(List<?> list, Random random)
    Moves every element of the list to a random new position in the list using the specified random number generator.
  • Uses of Random in java.util.concurrent

    Subclasses of Random in java.util.concurrent
    Modifier and Type Class Description
    class  ThreadLocalRandom
    A random number generator isolated to the current thread.