0

So I'm trying to make a lottery program which outputs up to 6 sets of 6 random numbers using only 2d arrays and arrays for my project. No arraylists are allowed. Here is what i have so far, but it's not running because I don't have a main file?. Someone help. Thank you

```
import java.util.*;
public class EXCLotto {
public static int[][] generateLottoTickets( int number )
{
int row, column;
int [][] ticketArray = new int[number][6];
java.util.Random random = new java.util.Random();
for( row = 0; row < number; row++ )
{
for( column = 0; column < 6; column++ )
{
ticketArray[row][column] = random.nextInt( 49 );
}
}
return ticketArray;
}
public static void printTickets( int[][] ticketArray, int number )
{
int row, column;
String rowString;
System.out.println( "your tickets are:" );
for( row = 0; row < number; row++ )
{
rowString = "";
for( column = 0; column < 6; column++ )
{
rowString = rowString + ticketArray[row][column] + " ";
}
System.out.println( rowString );
}
}}
```

*Edited
by ippo*