01:import java.util.Map;
02:import java.util.TreeMap;
03:
04:public class BoxingDemo1 {
05: public static void main(String[] args) {
06: Map map = new TreeMap();
07: for(int i=0; i<args.length; i++) {
08: Integer frequency = (Integer)map.get(args[i]);
09: if(frequency==null) map.put(args[i], new Integer(1));
10: else map.put(args[i], new Integer(frequency.intValue() + 1));
11: }
12: System.out.println(map);
13: }
14:}