The following method generates a random number between low
and high, including both low and high. As you type it in, be
sure you understand how it works. Also, you might want to test it to
make sure that you typed it correctly and I haven't messed up.
public static int randomInt (int low, int high)
{
double x = Math.random() * (high - low + 1);
return (int) x + low;
}