资料整理
HashMap word_map = new HashMap();
...
int length = word_map.size();
Iterator iter =word_map.entrySet().iterator();
if(iter != null){
         while(iter.hasNext()){
        Entry element = (Entry)iter.next();
        Object strKey = element.getKey(); //键值
        Object strValue = element.getValue(); //value值
        }
}
HashMap word_map = new HashMap();
...
List list = new ArrayList(word_map.entrySet());
Collections.sort(list,
         new Comparator(){
         public int compare(Object o1,Object o2){
                Entry obj1 = (Entry) o1;
                Entry obj2 = (Entry) o2;
                 return ((Integer)(obj2.getValue()) - (Integer)(obj1.getValue()));
}});
for(Iterator iter = list.iterator();iter.hasNext();){
        Entry element = (Entry) iter.next();
        Object strKey = element.getKey(); //键值
        Object strValue = element.getValue(); //value值
}