Question: Write a program that reads numbers from the keyboard into an array of type int[]. You can assume that there won't be more than 50

Write a program that reads numbers from the keyboard into an array of type int[]. You can assume that there won't be more than 50 elements added to the list. Your output should be a two column list. The first is the set of distinct array elements, the second column is the number of occurrences of each element. The list should be sorted on entries in the first column, largest to smallest. As an example for the array itself: {-12, 3, -12, 4, 1, 1, -12, 1, -1, 1, 2, 3, 4, 2, 3, -12} Your output should look like the following: Save your solution in a file named IntList.java
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
