class Testque4 {
public static void main(String[] args) {
int index = 0;
while (index <= 1000) {
index = index + 5;//?????
if (index == 400) {
continue;
}
System.out.println("The index is " + index);
}
}
}
class Testque3 {
public static void main(String[] args) {
int index = 0;
while (index <= 1000) {
if (index == 400) {
continue;
}
System.out.println("The index is " + index);
index = index + 5;//?????
}
}
}
为什么第一个程序从5显示,跳过400,到1005结束;而第二个从0开始,到395结束?? |