There is a package called java.util.Random that will help you with pseudo-random numbers. In particular, check out nextInt(n).

You can easily use this to generate a random integer in a given...