Java Linked List

Hi, I need a program that read in a sequence of integers from a text file (given in command prompt, eg java List listdata.txt), and then prints the results in a table – with integers in ascending order along with the no. of times each integer appeared in the file.

eg a text file with:

2
30
5
7
9
2
2
30
-1 (this value needs to stop the program reading the file, ie it is an end of file character that I need to use)

should produce an output:

Value Occurences
2 3

Leave a Reply

Your email address will not be published. Required fields are marked *