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