Java 哈希Map遍历

内容纲要
Map<String, List<String>> map = connection.getHeaderFields();
Set<Map.Entry<String,List<String>>> entries = map.entrySet();
Iterator<Map.Entry<String,List<String>>> iterator =  entries.iterator();
while (iterator.hasNext()){
    Map.Entry<String,List<String>> next = iterator.next();
    String key = next.getKey();
    List<String> value = next.getValue();
}
THE END
分享
二维码
< <上一篇
下一篇>>