欢迎来到易学考试网 易学考试官网
全部科目 > Java认证考试 > SCJP程序员认证考试

单项选择题

public class WhileFoo { 
public static void main (String []args)   { 
int x= 1, y = 6; 
while (y--)  {x--;} 
system.out.printIn(“x=” + x “y =” + y); 
} 
}  
What is the result?()  

    A. The output is x = 6 y = 0
    B. The output is x = 7 y = 0
    C. The output is x = 6 y = -1
    D. The output is x = 7 y = -1
    E. Compilation will fail.

点击查看答案&解析

相关考题

微信小程序免费搜题
微信扫一扫,加关注免费搜题

微信扫一扫,加关注免费搜题