The seperate solutions
#1 Write a program that reads text from [url removed, login to view] and breaks it up into individual words. Insert the words into a tree set. At the end of the input file, print all words, followed by the size of the resulting set. This program determines how many unique words a text file has.
#2 Write a program that reads a Java source file and produces an index of all identifiers in the file. For each identifier, print all lines in which it occurs. Hint: Call [url removed, login to view]("[^A-Za-Z0-9_]+"). Then each call to next returns a string consisting only of letters, numbers, and underscores.
#3 Try to find two words with the same hash code in a large file, such as the /usr/share/dict/words file on a Linux system. Keep a Map<Integer, HashSet<String>>. When you read in a word, compute its hash code h and put the work in the set whose key is h. Then iterate through all keys and print the sets whose size is > 1.