package nilpointer.net;
import java.util.concurrent.ThreadLocalRandom;
public class Demo {
public static void main(String[] args) {
int min = 20;
int max = 100;
int value = ThreadLocalRandom.current().nextInt(min, max + 1);
System.out.println("The Random Number is " + value);
}
}
Output
The Random Number is 39