CountWords.java uses some of the new features of Java 1.5.
You should compare the ease of programming this with the nightmare you endured doing a similar job in C in your lab.
Now I want you to make a small adjustment:
> java CountWords CountWords.java = = appears 11 times > java CountWords tobe.txt to to appears 2 timestobe.txt contains the first few words of Hamlet's soliloquy. See the extra string on the commandline ("=" and "to"): We look it up in the HashMap and print the count.
For this last exercise, you will not need to do much to the code of the original CountWords.java. But you will need to do some digging around in the API documentation.