题库 软件开发 题目列表 以下JAVA程序的运行结果是什么(  ) public static...
单选题
以下JAVA程序的运行结果是什么(  )
public static void main(String[] args) {
    Object o1 = true ? new Integer(1) : new Double(2.0);
    Object o2;
    if (true) {
    o2 = new Integer(1);
    } else {
        o2 = new Double(2.0);
    }
    System.out.print(o1);
    System.out.print(" ");         
    System.out.print(o2);
}


A.

1 1

B.

1.0 1.0

C.

1 1.0

D.

1.0 1

题目信息
校招真题
-
正确率
0
评论
23
点击