Generating random integers over a specific range using java

PHOTO EMBED

Mon Nov 09 2020 15:45:43 GMT+0000 (Coordinated Universal Time)

Saved by @Muhammadcodes #java

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

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