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

Java认证考试

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

11. public static void main(String[] args) {  12. Object obj =new int[] { 1,2,3 };  13. int[] someArray = (int[])obj;  14. for (int i: someArray) System.out.print(i +“ “)  15. }  What is the result? ()

  • A、 1 2 3
  • B、 Compilation fails because of an error in line 12.
  • C、 Compilation fails because of an error in line 13.
  • D、 Compilation fails because of an error in line 14.
  • E、 A ClassCastException is thrown at runtime.
正确答案:A
答案解析:
进入题库查看解析

微信扫一扫手机做题