Here is how to generate a random value between two included bounds. The code is HERE

public
 class Rand {
    public static void main(String[] args) {
        System.out.println(Rand.randInRangeInc(Integer.valueOf(args[0]),
                Integer.valueOf(args[1])));
    }

    /**
     *
     @param min The (included) lower bound of the range
     * @param max The (included) upper bound of the range
     *
     * @return The random value in the range
     */
    public static int randInRangeInc(int min, int max) {
        return min + (int) (Math.random() * ((1 + max) - min));
    }
}