Random number generation

Objective #1: Use the Math.random static method for random number generation to create simulations.

You will not be tested on the information below and it is not covered on the AP Computer Science exam.

Objective #2: Use the Random class for random number generation to create simulations.

1  import java.util.Random;
2  
3  public class RandomNumbers
4  {
5     public static void main(String[] args)
6     {
7         Random dice = new Random();
8         int diceRoll = dice.nextInt(6) + 1;
9     }
10 }