import java.util.*;
class ForEachDemo
{
public static void main(String[] args)
{
HashMap<Integer,String> hm=new HashMap<Integer,String>();
hm.put(1,"aeb");
hm.put(2,"abc");
hm.put(3,"dab");
hm.put(4,"abd");
Set<Map.Entry<Integer,String>> entryset=hm.entrySet();
for(Map.Entry<Integer,String> me:entryset);
{
System.out.println(me.getKey()+".."+me.getValue());
}
}
}
这个代码为什么有错呀?? |