title: Dice roll array and method calling
body: <p>I am working on this question and I can not figure out how to get an array to keep track of the rolls in main and how to loop call the method that is doing the rolls. (Please help I am working on this by myself no teacher.)</p>
  
  <p>The Problem:</p>
  
  <p>Write a program that simulates rolling two dice. Prompt the user to enter the number of dice rolls. Use a loop to repeatedly call a method that simulates a dice roll and returns the total of the two dice to main. Keep track of the rolls in an array in main, and end the program by showing the results of the rolls.</p>
  
  <p>Sample Output: </p>
  
  <pre><code>How many times should I roll the dice? 100
  Results for 100 dice rolls 
  2 was rolled 4 times
  3 was rolled 2 times
  4 was rolled 1 times
  5 was rolled 8 times
  6 was rolled 15 times
  7 was rolled 16 times
  8 was rolled 17 times
  9 was rolled 18 times
  10 was rolled 10 times
  11 was rolled 6 times
  12 was rolled 3 times
  </code></pre>
  
  <p>My code so far: </p>
  
  <pre><code>import java.util.Scanner; 
  public class TestingCenter {
      private static Scanner input;   
      public static void main(String[] args){ 
  
          System.out.println("How many times should I roll the dice? ");
          int answer = input.nextInt();
          for (int x = 0; x &lt; answer; x++) {  
  
  
          }
      }
  
  
      public static int amount(int x){
              int die1;   
              int die2;   
              int roll;  
              die1 = (int)(Math.random()*6) + 1;
              die2 = (int)(Math.random()*6) + 1;
              roll = die1 + die2;
              return roll;
  
  }
  }
  </code></pre>