当前位置:SCJP程序员认证考试题库

问题:

[单选]

1. class A implements runable (  
2. int i;  
3. public void run () (  
4. try (  
5. thread.sleep(5000);  
6. i= 10;  
7. ) catch(InterruptedException e) {}  
8. )  
9. )  
10.  
11. public class Test {  
12. public static void main (string args) (  
13. try (  
14. A a = new A ();  
15. Thread t = new Thread (a); 
16. t.start(); 
17.  
18. int j= a.i;  
19.  
20. ) catch (Exception e) {}  
21. )  
22. )  
Which statement al line 17 will ensure that j=10 at line 19?()

A .  a.wait();
B .  t.wait();
C .  t.join();
D .  t.yield();
E .  t.notify();
F .  a.notify();
G .  t.interrupt();

外汇“两得宝”业务有何特点? 在施工部署中的()是项目组织机构和施工队伍的布置。 中心。 核心。 关键。 要害。 简述中国企业到海外投资办企业的可能性和条件。 地震波分哪几类?各引起地面什么方向的振动? 简述人际交往沟通方法和艺术?

1. class A implements runable (  
2. int i;  
3. public void run () (  
4. try (  
5. thread.sleep(5000);  
6. i= 10;  
7. ) catch(InterruptedException e) {}  
8. )  
9. )  
10.  
11. public class Test {  
12. public static void main (string args) (  
13. try (  
14. A a = new A ();  
15. Thread t = new Thread (a); 
16. t.start(); 
17.  
18. int j= a.i;  
19.  
20. ) catch (Exception e) {}  
21. )  
22. )  
Which statement al line 17 will ensure that j=10 at line 19?()

参考答案:

  参考解析

本题暂无解析

在线 客服