package com.yenange.test3;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
public class TestMap {
public static void main(String[] args) {
Map map=new HashMap();
map.put(1, 1);
map.put(5, 3);
map.put(2, 7);
map.put(6, 4);
Iterator iterator=map.keySet().iterator();
while (iterator.hasNext()) {
int key=(Integer)iterator.next();
System.out.println("键:"+key+"/t值:"+map.get(key));
}
}
}