int randomNum = ThreadLocalRandom.current().nextInt(min, max + 1); Min + (int)(Math.random() * ((Max - Min) + 1))