The util.Math class / util.Math methods |
Initializes the pseudo-random numbers generator.
util.Math.srand()
The srand() function initializes the pseudo-random numbers generator. It must be called before subsequent calls to the rand() function. If you do not call the srand() function, the rand() function will generate the same sequence of numbers for every program execution. The numbers generated by rand() can vary according to the operating system.