I'm working on a program for class, and it specifies that we write code that will generate 10,000 random numbers 1-6, but then we have to display a dialog that shows how many 1's appeared, how many 2's appeared, and so on. this is what i have so far:
public class ARG
{
public static void main(String[] args)
{
int[] A = new int[10000];
for(int i=0; i<A.length; i++)
A[i] = 1 + (int) (6*Math.random());
for (int i=0; i<A.length; i++)
System.out.println(A[i]);
}
}
I just need some hints at how to display the number of 1's appeared, etc. I'm a beginner java programmer so if it's possible please use detail and not too many complicated concepts because I'm only in an intro to java class. Any help will be appreciated! thank you!

New Topic/Question
Reply



MultiQuote




|