Array - Loop - Generate random number in Java : <p>I have to write a program that generate random integers from 0 to 9 for 1000 times and count repeated numbers. So output should be like:</p>

<p>0 used 123 times,
1 used 89 times,
2 301 times,
.
.
9 used 23 times</p>

<p>I must use math.random for this. I can generate numbers but how can I use array and loop for this?</p>

<p>Thanks.</p>
