为什么会输出21?循环条件不是只到20为止吗?
package tiaojian;
public class For {
public static void main (String []args){
int i=0;
while (i<=20){
i++;
System.out.println(i);
}
}
}
package tiaojian;
public class For {
public static void main (String []args){
int i=0;
while (i<=20){
i++;
System.out.println(i);
}
}
}
2018-09-05
举报