final int min = 20; final int max = 80; final int random = new Random().nextInt((max - min) + 1) + min;