0 points

Generating random integers over a specific range using java


dashboard

Mon Nov 09 2020 15:45:43 GMT+0000 (UTC)

Posted by @Muhammadcodes #java

randomNum = minimum + (int)(Math.random() * maximum);
// Bug: `randomNum` can be bigger than `maximum`.
content_copy Copy

https://stackoverflow.com/questions/363681/how-do-i-generate-random-integers-within-a-specific-range-in-java?rq