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是关键字
程序能够正常编译和运行
我手机上,while是第四行,找谁说理去?
while里面位布尔类型
loop不是关键字
这道题你会答吗?花几分钟告诉大家答案吧!
扫描二维码,关注牛客网
下载牛客APP,随时随地刷题