Finding Modes

A mode of a list of values is a value that occurs with maximum frequency. Write a class named ModeFinder whose main method prompts the user to enter some number of integer values, separated by spaces, and then prints the number of modes present, followed by the modes themselves, separated by commas.

Sample run:

This program will find the mode(s) for a given list of integers.
----------------------------------------------------------------
Enter some number of integers, separated by spaces: 7 1 2 3 2 4 5 2 5 6 8 9 8 10 5 9 8
There were 3 modes:
2, 5, 8