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();
}
共有 0 条评论