📜  android 键值对 - 任何代码示例

📅  最后修改于: 2022-03-11 14:57:13.105000             🧑  作者: Mango

代码示例1
Map  myMap = new HashMap();

Iterator> iterator = myMap.entrySet().iterator();
while (iterator.hasNext()) {
    Map.Entry pairs = (Map.Entry)iterator.next();
    String value =  pairs.getValue();
    Integer key = pairs.getKey();
    System.out.println(key +"--->"+value);
}