Uses of Class
java.util.Random
Packages that useRandom Package Description java.math Provides classes for performing arbitrary-precision integer arithmetic (BigInteger) and arbitrary-precision decimal arithmetic (BigDecimal).java.security Provides the classes and interfaces for the security framework.java.util Contains the collections framework, some internationalization support classes, a service loader, properties, random number generation, string parsing and scanning classes, base64 encoding and decoding, a bit array, and several miscellaneous utility classes.java.util.concurrent Utility classes commonly useful in concurrent programming.Uses ofRandom injava.math
Methods injava.math with parameters of typeRandom Modifier and Type Method Description staticBigIntegerBigInteger. probablePrime(int bitLength,Random rnd)Returns a positive BigInteger that is probably prime, with the specified bitLength.Constructors injava.math with parameters of typeRandom Constructor Description BigInteger(int bitLength, int certainty,Random rnd)Constructs a randomly generated positive BigInteger that is probably prime, with the specified bitLength.BigInteger(int numBits,Random rnd)Constructs a randomly generated BigInteger, uniformly distributed over the range 0 to (2numBits- 1), inclusive.Uses ofRandom injava.security
Subclasses ofRandom injava.security Modifier and Type Class Description classSecureRandomThis class provides a cryptographically strong random number generator (RNG).Uses ofRandom injava.util
Methods injava.util with parameters of typeRandom Modifier and Type Method Description static voidCollections. shuffle(List<?> list,Random rnd)Randomly permute the specified list using the specified source of randomness.Uses ofRandom injava.util.concurrent
Subclasses ofRandom injava.util.concurrent Modifier and Type Class Description classThreadLocalRandomA random number generator isolated to the current thread.