62,635
社区成员




public class Test {
public static void main(String[] args){
Map map = new HashMap();
for(int i = 0; i < 4; i++)
map.put(i,i + 10);
Set<Map.Entry> set = map.entrySet();
Iterator it = set.iterator();
while(it.hasNext()){
Map.Entry k = (Map.Entry)it.next();
System.out.println(k.getKey() + "===" + k.getValue());
}
}
}
/**
*结果:
*0===10
*1===11
*2===12
*3===13
*
*/