posted 17 years ago
Hi ranchers,
I could not find the solution page in the link provided from Michael (question #12).
Anyway, a seed is a starting value in generating pseudo random numbers.
If you specify the seed, all "random" numbers generated from this will appear in the same sequence.
But in Math.random() you cannot specify the seed, it is calculated from the system time in milliseconds.
You can however specify the seed in the java.util.Random class.
Example:
The first two columns started with the same seed show the same "random" numbers.
Output is
Seed is used when you want some control in your random numbers, eg when doing statistics or cheating in online poker games. For the last thing be sure your gun is faster, cowboys.
Yours,
Bu.
all events occur in real time