The SecureRandom class produces random numbers that are strong cryptographically. Here is how to use it to generate random numbers:
Example
// Create an instance of the SecureRandom class
SecureRandom random = new SecureRandom();
// Generate integers that are random in the range between 0 and 999
int randomNumber = random.nextInt(1000)
// Generate integers that are random in the range between 1 and 1000
int randomNumber2 = random.nextInt(1000) + 1;