Iterator it =map1.keySet().iterator(); while(it.hasNext()){ if((Integer)it.next()==1) if的条件报错HashMap map1= new HashMap(); map1.put(1, "212"); Iterator it =map1.keySet().iterator(); while(it.hasNext()){ if((Integer)it.next()==1){ m
来源:学生作业帮助网 编辑:六六作业网 时间:2024/12/24 09:17:59
Iterator it =map1.keySet().iterator(); while(it.hasNext()){ if((Integer)it.next()==1) if的条件报错HashMap map1= new HashMap(); map1.put(1, "212"); Iterator it =map1.keySet().iterator(); while(it.hasNext()){ if((Integer)it.next()==1){ m
Iterator it =map1.keySet().iterator(); while(it.hasNext()){ if((Integer)it.next()==1) if的条件报错
HashMap map1= new HashMap();
map1.put(1, "212");
Iterator it =map1.keySet().iterator();
while(it.hasNext()){
if((Integer)it.next()==1){
map1.get(it.next());
System.out.println("11111111");
Iterator it =map1.keySet().iterator(); while(it.hasNext()){ if((Integer)it.next()==1) if的条件报错HashMap map1= new HashMap(); map1.put(1, "212"); Iterator it =map1.keySet().iterator(); while(it.hasNext()){ if((Integer)it.next()==1){ m
你迭代器要是用泛型.
Iterator it=map1.keySet().iterator();
还有就是在使用迭代器的时候,你判断一次,游标走了2次,使用了2次next();
while(it.hasNext()){
int key=it.next();
if(key==1)
.//后边自己写了
}