title: How to use random class with parameters?
body: <p>How do I create parameters with the random class? I do this but it sends out an error message.</p>
  
  <pre><code>import java.util.Random;
  
  public class DiceSimulation { 
      public static void main(String[] args)
      {
            final int NUMBER = 10000;
  
           Random generator = new Random();
  
           int die1Value; int die2Value; int count = 0; int snakeEyes = 0; 
           int twos = 0; int threes = 0; int fours = 0; int fives = 0; 
           int sixes = 0;
  
           while (count &lt; NUMBER) {
  
                die1Value = generator.nextInt(1, 6); 
                die2Value = generator.nextInt(1, 6);
  
                if (die1Value == die2Value)   { 
                      if(die1Value == 1) { snakeEyes++; } 
                      else if (die1Value == 2) { twos++; } 
                      else if (die1Value == 3) { threes++; } 
                      else if (die1Value == 4) { fours++; } 
                      else if (die1Value == 5) { fives++; } 
                      else if (die1Value == 6) { sixes++; }
  
                }     
                count++; 
           }
  </code></pre>