package tiaojian;
public class For {
public static void main (String []args){
int i=0;
while (i<=20){
i++;
System.out.println(i);
}
i为20的时候还是会自增一次的。改为i<20,即19的时候输出就是20了
while(i<=20)改为while(i<20)