多做题,通过考试没问题!

Java认证考试

睦霖题库>其他计算机考试>Java认证考试

10.publicclassBar{ 11.staticvoidfoo(int...x){ 12.//insertcodehere 13.} 14.} Which two code fragments,inserted independently at line1 2,will allow the class to compile()

  • A、foreach(x)System.out.println(z);
  • B、for(intz:x)System.out.println(z);
  • C、while(x.hasNext())System.out.println(x.next());
  • D、for(inti=0;i
正确答案:B,D
答案解析:
进入题库查看解析

微信扫一扫手机做题