Rolling-dice class and driver
<p>alright so i have to write a class and driver that has the user input the number of dice and the number of rolls. and then i have to make an array based off the number of dice * 6. but i get errors. like arrayindexoutofboundsexception. </p>

<p>after i make the array i have to fill it with random numbers and use a histogram to display the program. so the program should look like this
Please give any positive help here, im new to this programing this and i would love to learn more. also i cant seem to figure out if statements for the Y/N area to start the program</p>

<pre><code>Welcome to the dice-rolling simulator!

Do you wish to run a simulaton? Y/N: x

that was an invalid option. Please try again.

Do you wish to run a simulation? Y/N: y

How many dise di you wish to roll? 2

How many rolls to you wish to make? 100000

2:@@@@@@

3:@@@@

4:@@@@@@@@@@@

5:@@@@@

6:@@

7:@

8:

9:@@@@@@@@@@

10:@@@

11:@@@@@@@@@@@@@@

12:@@@@@@
</code></pre>

<p>//I had to you @ signs because * would not work here</p>

<p>here is my program updated! how do i create the histogram?</p>

<pre><code>package dice;

import java.util.Scanner;
import java.util.Random;

public class Dice 
{
    public static Scanner in = new Scanner (System.in);



    private int dice = 0;
    private int roll = 0;
    private int start;
    private int[] diceAr;
    private int[] rollAr;
    private int simDice;
    private String star = "*";

         //****************************************************************     
    public Dice()
    {
        System.out.println("Welcome to the dice-rolling simulator!\n");
        System.out.println("Do you wish to run a simulation? Y/N; ");
        //start = in.nextInt();


        while (true) {

        System.out.print ("How Many Dice Do You Want To Roll?  ");
            dice = in.nextInt();
            simDice = (dice * 6)-1;
            diceAr = new int[simDice];

                if (dice &gt; 0)
                    break;
          }


        while (true) {

        System.out.print ("How Many Times Do You Want To Roll?  ");
            roll = in.nextInt();
            rollAr = new int[roll];

                if (roll &gt; 0)
                    break;
        }   
    }
    //**********************************************    

      //    public void display()
      //    {
    //
        for ( int i = 0; i &lt; simDice; i++)
      //        {
      //            diceAr[i] = (int)(Math.random()* simDice);
      //            
      //        }
      //        for(int i = 0; i&lt;simDice; i++)
       //       {
       //           System.out.println((i + dice) + ". " + diceAr[i]);
       //       }
       //       
      //    }
     //*********************************************************

    public void display(int diceAr[], int simDice, int roll)
    {
        for(int i=0; i &lt; simDice; i++)
        {
            diceAr[i]  = (int) (Math.random()* simDice);

        }

        for(int i=0; i &lt; roll; i++)
        {

        }

    }

}
</code></pre>
