go
go go
go go go
go 之后跟着一个异常
第1题:
If it rains tomorrow, we()out for a picnic.
A. wouldn't go
B. can't go
C. won't go
第2题:
I want to go to the dentist, but you ______ with me.
A、need not to go
B、do not need go
C、need not go
D、need go not
第3题:
A.gogo
B.gogogo
C.go之后跟着一个异常
D.gogo之后跟着一个异常
第4题:
第5题:
现有: class Thread2 implements Runnable { void run() { System.out.print("go "); } public static void main(String [] args) { Thread2 t2 = new Thread2(); Thread t = new Thread(t2); t.start(); } } 结果为:()
第6题:
1. class MyThread implements Runnable { 2. public void run() { 3. System.out.print("go "); 4. } 5. 6. public static void main(String [] args) { 7. // insert code here 8. t.start(); 9. } 10. } 和如下四句: Thread t = new MyThread(); MyThread t = new MyThread(); Thread t = new Thread(new Thread()); Thread t = new Thread(new MyThread()); 分别插入到第5行,有几个可以通过编译?()
第7题:
public class Threads4 { public static void main (String[] args) { new Threads4().go(); } public void go() { Runnable r = new Runnable() { public void run() { System.out.print(”foo”); } }; Thread t = new Thread(r); t.start(); t.start(); } } What is the result?()
第8题:
现有:t是一个合法的Thread对象的引用,并且t的合法run()方法如下: public void run() { System.out.print ("go"); } 及: t.start(); t.start(); t.run(); 哪一个是结果?()
第9题:
go
编译失败
代码运行,无输出结果
运行时异常被抛出
第10题:
Compilation fails.
An exception is thrown at runtime.
The code executes normally and prints „foo”.
The code executes normally, but nothing is printed.
第11题:
go
运行时异常被抛出
代码运行,无输出结果
编译失败
第12题:
Code block a.
Code block B.
Code block c.
Code block d.
Code block e.
第13题:
A.go
B.编译失败
C.代码运行,无输出结果
D.运行时异常被抛出
第14题:
A.go
B.gogo
C.gogogo
D.go之后跟着一个异常
第15题:
Whose idea was it to go to the opera? I suggested________
A.go
B.to go
C.that go
D.going
第16题:
public class Threads3 implements Runnable { public void run() { System.out.print(”running”); } public static void main(String[] args) { Thread t = new Thread(new Threads3()); t.run(); t.run(); t.start(); } } What is the result?()
第17题:
t 是一个合法的 Thread 对象的引用,并且 t 的合法 run() 方法如下: public void run() { System.out.print("go "); } 及: t.start(); t.start(); t.run(); 哪一个是结果?()
第18题:
Which three will compile and run without exception?()
第19题:
Given that a static method doIt() in a class Work represents work to be done, what block of code will succeed in starting a new thread that will do the work? CODE BLOCK a: Runnable r = new Runnable() { public void run() { Work.doIt(); } }; Thread t = new Thread(r); t.start(); CODE BLOCK b: Thread t = new Thread() { public void start() { Work.doIt(); } }; t.start(); CODE BLOCK c: Runnable r = new Runnable() { public void run() { Work.doIt(); } }; r.start(); CODE BLOCK d: Thread t = new Thread(new Work()); t.start(); CODE BLOCK e: Runnable t = new Runnable() { public void run() { Work.doIt(); } }; t.run();
第20题:
Compilation fails.
An exception is thrown at runtime.
The code executes and prints “running”.
The code executes and prints “runningrunning”.
The code executes and prints “runningrunningrunning”.
第21题:
go go
go go go
go之后跟着一个异常
go go之后跟着一个异常
第22题:
0
1
2
3
第23题:
in pre
pre in
in pre post
pre in post