Hello friend (suppose so, still depends anyway, ^:)^)
Could you tell me how random in java is implemented ? Is it the same as C's rand() ?
Thanks,
:):):):)
Printable View
Hello friend (suppose so, still depends anyway, ^:)^)
Could you tell me how random in java is implemented ? Is it the same as C's rand() ?
Thanks,
:):):):)
you can use Math.random() which returns a number n such that 0 <= n < 1
or you can use the Random class, which provides for better control of random sequences, ranges, and ability to repeat a sequence
http://java.sun.com/j2se/1.4.2/docs/...il/Random.html
There's an option, when you install the J2SE SDK, to also include the source code for the Java library during installation. After installation, open the zip file called src.zip in the folder where you chose to install SDK.