how to pick a random integer in java code example
Example 1: random numbers java
int random = (int) (Math.random()*(max-min+1)+min);
Example 2: java random number generator in range
int rand = ThreadLocalRandom.current().nextInt(x,y);
int random = (int) (Math.random()*(max-min+1)+min);
int rand = ThreadLocalRandom.current().nextInt(x,y);