Java.Util.Random: Method Members

The methods of Java.Util.Random are listed below. For a list of all members, see the Random Members list.

See Also: Inherited members from Java.Lang.Object

Public Methods

NextBoolean() : bool
Returns a pseudo-random uniformly distributed boolean.
NextBytes(byte[])
Fills buf with random bytes.
NextDouble() : double
Returns a pseudo-random uniformly distributed double in the half-open range [0.
NextFloat() : float
Returns a pseudo-random uniformly distributed float in the half-open range [0.
NextGaussian() : double
Returns a pseudo-random (approximately) normally distributed double with mean 0.0 and standard deviation 1.
NextInt() : int
Returns a pseudo-random uniformly distributed int.
NextInt(int) : int
Returns a pseudo-random uniformly distributed int in the half-open range [0, n).
NextLong() : long
Returns a pseudo-random uniformly distributed long.
SetSeed(long)
Modifies the seed using a linear congruential formula presented in The Art of Computer Programming, Volume 2, Section 3.

Protected Methods

Next(int) : int
Returns a pseudo-random uniformly distributed int value of the number of bits specified by the argument bits as described by Donald E.