title: Simple Java lottery program
body: <p>My code above is to allow the user to enter how many tickets they want generated between 1-100, then the program generating random 6 numbers between 1-50 for the amount of tickets the user wants. After that, the program will generate another 6 numbers in a ticket and check how many winning numbers there are.
  My problem is I want to take the users entry and number's generated for each ticket and create a 2D array. However if you take a look at my final line of code, I get an error when I try to create a section for the ticket and random number for that same ticket. The error is the 2D array not going through with the code. The array should display the random numbers with each ticket.</p>
  <pre><code>Scanner entry=new Scanner(System.in); 
      
      int ticketAmnt;
      
      do
      {
          System.out.println(&quot;How many tickets will you be generating?&quot;);
          ticketAmnt = entry.nextInt();
      }
      while(ticketAmnt&lt;1 || ticketAmnt&gt;100);
      
      int randomNumbers[] = new int[6];
      
      for (int i = 0; i &lt;randomNumbers.length; i++)
      {
          randomNumbers[i] = (int) (Math.random() * 50);
      }
      
      int lottery [][] = new int [ticketAmnt][randomNumbers];
  </code></pre>