- #1
mtanti
- 172
- 0
I'm programming in Java and using the Random class and I'm not sure if it makes a difference whether I use a single accessible Random object for the whole program or if I should create multiple instances (one for each object needing it?). Are there disadvantages to using one instead of the other?
I'm assuming that it would help to be able to reuse the same seed on a single random object in order to re-create the same sequence of random numbers during debugging and comparisons.
Thanks.
I'm assuming that it would help to be able to reuse the same seed on a single random object in order to re-create the same sequence of random numbers during debugging and comparisons.
Thanks.