How to generate “random” but also “unique” numbers?

后端 未结 6 1416
忘了有多久
忘了有多久 2021-02-05 21:32

How are random numbers generated.? How do languages such as java etc generate random numbers, especially how it is done for GUIDs.? i found that algorithms like Pseudorandomnumb

6条回答
  •  独厮守ぢ
    2021-02-05 22:33

    Most random number generators have a way to "randomly" reïnitialize the seed value. (Sometimes called randomize).

    If that's not possible, you can also use the system clock to initialize the seed.

提交回复
热议问题