public class While { public void loop() { int x= 10; while ( x ) { System.out.print("x minus one is " + (x - 1)); x -= 1; } } }
行1有语法错误
行4有语法错误
行5有语法错误
行6有语法错误
行2有语法错误,loop是关键字
程序能够正常编译和运行