Random number generation

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

Objective #2: Use the Math.random static method in methods.

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 }