Take a look at the J2SE API documentation. Note that to generate a random number, you could make use of Math.random(), as suggested, or the class Random.
Are you able to figure out how to generate the random numbers you want after looking at the documentation of these two classes? If you're having trouble, just ask for more assistance, and be sure to post any code that you're working on.