Home » Java ThreadLocalRandom nextGaussian() Method with Examples

Java ThreadLocalRandom nextGaussian() Method with Examples

by Online Tutorials Library

Java ThreadLocalRandom nextGaussian() method

The nextGaussian() method of Java ThreadLocalRandom class returns the next pseudorandom which is the Gaussian (“normally”) distributed double value with mean 0.0 and standard deviation 1.0 from this random number generator’s sequence.

Syntax:

Parameter:

NA

Returns:

This method returns the next pseudorandom which is the Gaussian distributed double value.

Example 1

Test it Now

Output:

Random Gaussian double value is: 0.44227562722507735  

You may also like