首页 > 代码库 > Map

Map

Map<Integer,String> map = new HashMap<Integer, String>();
map.put(1,"a");
map.put(2,"b");
map.put(3,"c");
map.put(4,"d");
map.put(5,"e");
for(Map.Entry<Integer, String> en : map.entrySet())
{
System.out.println("key="+en.getKey()+" value="http://www.mamicode.com/+en.getValue());
}

Map