欢迎来到求知题库网 求知题库官网
logo
全部科目 > Java认证考试 > SCJP程序员认证考试

单项选择题

What will be the result of attempting to compile and run the following program?()  
public class Q28fd {  
public static void main(String args[]) {  
int counter = 0;  
l1:  
for (int i=10; i<0; i--) {  
l2:  int j = 0;  
while (j < 10) { 
 if (j > i) break l2;  
if (i == j) {  
counter++;  
continue l1;  
}  
}  
counter--;  
}  
System.out.println(counter); 
}  
} 

    A.The program will fail to compile.
    B.The program will not terminate normally.
    C.The program will write 10 to the standard output.
    D.The program will write 0 to the standard output.
    E.The program will write 9 to the standard output.

点击查看答案&解析

相关考题

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

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

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

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