I am working on a Java Project that reads a text file from the command line and outputs an alphabetical listing of the words preceded by the occurrence count. My program compiles and runs, but it displays duplicate listings of the words and they are not in the correct order. I have searched online and reviewed my book, but I can't figure out where I am going wrong...could anyone help to put me in the right direction?
From my text file, my output should be this: 1 a 1 am 1 computes 2 file 1 i 1 in 1 is 2 my 1 number 1 of 1 program 2 test 2 that 1 the 1 this 1 to 1 total 1 using 1 verify 1 words
could any please one help me to get this output