赞题库-背景图
单项选择题

阅读下列代码: public class Test{ String s="One World One Dream"; public static void main(String args[]){ System.out.println(s); } } 其运行结果是______。

A.args
B.One World One Dream
C.s
D.编译时出错
<上一题 目录 下一题>
热门试题

单项选择题阅读下列代码: public class Test implements Runnable{ public void run(Thread t){ System.out.println( Running. ); } public static void main(String[] args){ Thread tt=new Thread(new Test()); tt.start(); } } 代码运行结果是______。

A.将抛出一个异常
B.没有输出并正常结束
C.输出"Running"并正常结束
D.程序第2行将出现一个编译错误

单项选择题阅读下列一个支持多线程并发操作的堆栈类代码段: public class MyStack{ private int idx=0; private int[] data=new int[8]; pubiic______void push(int i){ data[idx]=i; idx++; } … } 在下画线处应填入的是______。

A.synchronized
B.wait
C.blocked
D.interrupt