hashmap 遍历 取值

        Map<String, String> gettext=new HashMap<String, String>();
         gettext=link.linkGet("F://htmls/compare/98.15.3.html","utf-8");;//给以一个hashpmap实例给gettext
         Iterator it = gettext.entrySet().iterator();
         while(it.hasNext())
         {
             Map.Entry<String,String> hiddenMapEntry = (Map.Entry<String,String>)it.next();  
             String key = hiddenMapEntry.getKey();
             key=link.replace("dispbbs", "http://www.cc98.org/list", key);
             urllist.add(key);
             String value = hiddenMapEntry.getValue();  
             System.out.println(key+"  "+value);
         }
         System.out.println(gettext.size());

你可能感兴趣的:(职场,遍历,HashMap,休闲)