What's the importance of using Random.setSeed?
java, random
Solution
One use of this is that it enables you to reproduce the results of your program in future.
As an example, I wanted to compute a random variable for each row in a database. I wanted the program to be reproducible, but I wanted randomness between rows. To do this, I set the random number seed to the primary key of each row. That way, when I ran the program again, I got the same results, but between rows, the random variable was pseudo random.
Problem
When writing Java program, we use `setSeed` in the `Random` class. Why would we use this method? Can't we just use `Random` without using `setSeed`? What is the main purpose of using `setSeed`?