首页 试题广场 > 试题详情
单选题

【C012032】public class Test
{
static boolean foo(char c)
{
System.out.print(c);
return true;
}
public static void main( String[] argv )
{
int i = 0;
for ( foo('A'); foo('B') && (i < 2); foo('C'))
{
i++ ;
foo('D');
}
}
}
What is the result?

  • A.ABDCBDCB
  • B.ABCDABCD
  • C.Compilation fails.
  • D.An exception is thrown at runtime.
提交并查看答案
下一题 上一题
Ke星伙伴们的回答/ 33个回答
关闭
关闭
QQ
交流群
邀请
好友
App
下载
意见
反馈
返回
顶部