RandomUtil
RandomUtil
class is used to generate pseudo-random numbers in java. An instance of this class is thread-safe. The instance of this class is however cryptographically insecure. This class provides various method calls to generate different random data types such as float, double, int.
nextGaussian();
Returns the next pseudorandom Gaussian distributed double number with mean 0.0 and standard deviation 1.0.
nextInt();
Returns the next Integer number.
nextDouble();
Returns the next double number.
nextBoolean();
Returns the next Boolean value.
nextLong();
Returns the next Long number
Last updated