java.util.Random (JDK 1.0)
This class implements a pseudo-random number generator. nextDouble() and nextFloat() return a value between 0.0 and 1.0. nextLong() and nextInt() return long and int values distributed across the range of those data types. nextGaussian() returns pseudo-random values with a Gaussian distribution--the mean of the values is 0.0, and the standard deviation is 1.0. You can use the setSeed() method or the optional constructor argument to initialize the pseudo-random number generator with some variable seed value other than the current time (the default), or with a constant to ensure a repeatable sequence of pseudo-randomness.
public classRandomextends Object implements Serializable { //Public ConstructorspublicRandom(); publicRandom(longseed); //Public Instance Methods1.1public voidnextBytes(byte[]bytes); public doublenextDouble(); public floatnextFloat(); public synchronized doublenextGaussian(); public intnextInt(); public longnextLong(); public synchronized voidsetSeed(longseed); //Protected Instance Methods1.1protected synchronized intnext(intbits); }
Passed To:
BigInteger()