Problem: For a text file, find the word that occurs most frequently.
Use a symbol table whose keys are words (String type) and whose value is the frequency of occurrence of each word (Integer type).
- Read the file and extract one word k at a time.
- Use the get(k) method to either determine that k is in the symbol table or not.
- If the word k is not in the symbol table, insert k with the value 1.
- If the word k was already in the symbol table, get its value, increment it, and put (k, updated value) back in the symbol table.