Hi I'm barely learning how to write java code and I need help with an assignment. The assignment consists of making an array that creates fifty random integers between zero and nine and displays the count to each number. Up to now I only know how to create the random number generator BUT I dont know how to display the count to each number(for example if the output was twenty zeros and maybe five 4's etc. from the fifty random numbers from zero to nine). This is what I have up to now:

int i= 0;

for{i=0; i<50; i++)

{

double x= Math.random();

int random = (int)(x*9);

System.out.println(random);

}

Thanks I really appreciate all help.