random number with seed

后端 未结 6 1183
暗喜
暗喜 2021-01-05 15:35

Reference: link text

i cannot understand the following line , can anybody provide me some example for the below statement?

If two instances of Random are cre

6条回答
  •  不知归路
    2021-01-05 15:44

    The random generator is deterministic. Given the same input to Random and the same usage of the methods in Random, the sequence of pseudo-random numbers returned to your program will be the same even in different runs on different machines.

    This is why it is pseudo-random - the numbers returned behave statistically like random numbers except they can be reliably predicted. True random numbers are unpredictable.

提交回复
热议问题