for循环

mac2022-06-30  23

for循环应用及局部变量作用范围


 

语法格式 例: public class ForDemo1 { public static void main(String[] args) { // 将10以下的整数打印输出 int i=1; //for(;;) while(true){ System.out.print(i+" "); if(i==10)break; i++; } } }

   

最新回复(0)