You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
public static void removeOverNews(Set set, int N){
int i = 0;
Iterator ite = set.iterator();
while (ite.hasNext()){
if (i >= N){
ite.remove();
ite.next();
}else{
ite.next();
}
i++;
}
}
要把
if (i >= N){
ite.remove();
ite.next();
}
里边的这两名话交换一下位置,移除的结果才是正确的
The text was updated successfully, but these errors were encountered:
public static void removeOverNews(Set set, int N){
int i = 0;
Iterator ite = set.iterator();
while (ite.hasNext()){
if (i >= N){
ite.remove();
ite.next();
}else{
ite.next();
}
i++;
}
}
要把
if (i >= N){
ite.remove();
ite.next();
}
里边的这两名话交换一下位置,移除的结果才是正确的
The text was updated successfully, but these errors were encountered: