题目内容

以下程序的输出结果为:()class MyThread extends Thread{MyThread() {}MyThread(Runnable r) {super(r); }public void run(){System.out.print("Inside Thread ");}}class MyRunnable implements Runnable{public void run(){System.out.print(" Inside Runnable");}}class Test{public static void main(String[] args){new MyThread().start();new MyThread(new MyRunnable()).start();}}

A. 输出 "Inside Thread Inside Thread"
B. 输出 "Inside Thread Inside Runnable"
C. 不会编译
D. 运行时异常

查看答案
更多问题

以下程序的输出结果为:()class s implements Runnable{int x, y;public void run(){for(int i = 0; i < 1000; i++)synchronized(this){x = 12;y = 12;}System.out.print(x + " " + y + " ");}public static void main(String args[]){s run = new s();Thread t1 = new Thread(run);Thread t2 = new Thread(run);t1.start();t2.start();}}

A. 死锁
B. 12 12 12 12
C. 编译错误
D. 没有输出

以下程序的输出结果为:()public class NFE{public static void main(String [] args){String s = "42";try{s = s.concat(".5");/* Line 8 */double d = Double.parseDouble(s);s = Double.toString(d);int x = (int) Math.ceil(Double.valueOf(s).doubleValue());System.out.println(x);}catch (NumberFormatException e){System.out.println("bad number");}}}

A. 42
B. 42.5
C. 43
D. bad number

以下程序输出结果为:()public class ArrayTest{public static void main(String[ ] args){float f1[ ], f2[ ];f1 = new float[10];f2 = f1;System.out.println("f2[0] = " + f2[0]);}}

A. f2[0] = 0.0
B. f2[0] = NaN
C. 编译错误
D. 不确定值

表象训练理论中()认为可以从神经肌肉与认知两个方面提高练习者的技术动作操作。

A. 心理神经肌肉理论
B. 符号学习理论
C. 唤醒-注意理论
D. 以上三个都不是

答案查题题库