java math random int code example
Example 1: java math.random
int rand = (int)(Math.random() * range) + min;
Example 2: java random number generator in range
int rand = ThreadLocalRandom.current().nextInt(x,y);
int rand = (int)(Math.random() * range) + min;
int rand = ThreadLocalRandom.current().nextInt(x,y);