i have an assignment where i use a random generator to get a number 1 through 6. i wrote the code to do this 10,000 time and i need to count how many times each number comes up. please help me, here is what i have so far.
import java.util.Scanner;
import java.util.Random;
public class NumberGenerator2
{
public static void main(String[] args)
{
int number1;
int count;
int max;
max = 10000;
for ( count = 1; count <= max; count++)
{
Random randomNumbers = new Random();
number1 = randomNumbers.nextInt(6);
System.out.println(number1 +1);
}
}
}