欢迎来到易学考试网 易学考试官网
全部科目 > Java认证考试 > Java认证考试综合练习

单项选择题

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

    A.123
    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.

点击查看答案&解析

相关考题

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

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