Random random = new Random(); int randomNumber = random.nextInt(upperBound - lowerBound) + lowerBound;