要求用while語句設(shè)計(jì)?
HashMap map=new HashMap ();
map.put("張三",80);
map.put("李四",50);
Iterator<String> iter = map.keySet().iterator();
while (iter.hasNext()) {
String key = iter.next();
int value = (Integer) map.get(key);
if(value <60){
System.out.println(key);
}
}