java的哈希遍历 hashmap

 Map<String,String> map = new HashMap<String, String>();
                map.put("title","xxx");
                map.put("condition","0");
                for (Map.Entry<String,String> entry:map.entrySet()){
                    Log.d(TAG, "onClick: "+entry.getKey());
                    Log.d(TAG, "onClick: "+entry.getValue());
                }

 

posted @ 2018-02-02 09:18  layfork  阅读(215)  评论(0编辑  收藏  举报