I need help creating a simple and easy to understand program
I need help creating a simple and easy to understand program in Java. Here is the exercise:
Write a program that generates 10 random numbers between 1 and 5, inclusive. The program will then display the number of occurrences of each number. For example, if the numbers generated are 5, 4, 3, 3, 1, 4, 5, 3, 1, 1 the output will be similar to:
Number Appears
1 3
2 0
3 3
4 2
5 2
Solution
Please find the required program and output below: Please find the comments against each line for the description:
------------------------------------------------------------
OUTPUT:
Number Appears
1 1
2 2
3 2
4 0
5 0
