/* * ============================================================= * CountWordFrequency: Read a stream of words from the keyboard. * Use a hashmap to record the frequency of each word. Then use * a treemap to order the words. * ============================================================= */ import java.util.*; public class CountWordFrequency { public static void main(String args[]) { Map map = new HashMap(); Integer ONE = new Integer(1); // Read stream of input from keyboard .. for (int i=0, n=args.length; i