1: 2: 3: 4: 5:
final int MAX = 8; final int MIN = 2; Random random = new Random(); int randomInt = random.nextInt(MAX-MIN) + MIN;