单项选择题

阅读下列代码: 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
相关试题
  • 在匹配器(Marcher)类中,用于输入字符串...
  • 下面程序段: boolean a=false; boole...
  • 在下面附属类方法中的下划线处应填入的正确...
  • 调用线程的下列方法,不会改变该线程在生命...
  • 下列关于线程调度的叙述中,错误的是___...