I use:

import java.utils.Random;

Random whatever = new Random();

int number = whatever.nextInt();

you can of define a range by putting a number within the ()'s of your instantiation.

Take a look at page 97 of the text.

If you are using this method, what errors are you getting?

Ken