True random generation in Java

后端 未结 13 2299
一生所求
一生所求 2020-12-01 01:18

I was reading the Math.random() javadoc and saw that random is only psuedorandom.

Is there a library (specifically java) that generates random numbers according to

13条回答
  •  [愿得一人]
    2020-12-01 01:58

    There is no true random number generator since they all rely one way or another on deterministic procedures to compute a random number, so, no matter how generated numbers appear to follow a true random distribution, they might be a part of a hidden -and very complex- pattern, hence they are Pseudo-Random. However, you can implement your own random number generator, there are a couple of nice, computational-cheap methods you can read in Numerical Recipes in C, Second Edition - Section 7. HTH

提交回复
热议问题