class TestFor
{
public static void main(String[] args){
int x=1;
for(System.out.println("a");System.out.println("b");System.out.println("c")){
System.out.println("d")
}// this for-circle can't be compiled,because the second expression"System.out.println("b")" need to be bealean
//the changed circle is right
for(System.out.println("a");x<4;System.out.println("a")){
System.out.println("d");
}
}
}
/*
more about :
the simplest infinite circle: for语句 for(;;){}
while语句:while(true){}
*/
循环语句的一些小知识点
最新推荐文章于 2022-04-16 15:07:06 发布