Map的遍历

        
Set set = maps[0].entrySet();
Map.Entry[] entries = (Map.Entry[])set.toArray(new Map.Entry[set.size()]);
for (int i = 0; i < entries.length; i++) {
    System.out.println(entries[i].getKey().toString() + ": " + entries[i].getValue().toString());
}

你可能感兴趣的:(java)