关于线程的-----为什么没有任何输出结果?
1. public class A extends Thread {
2. A() {
3. setDaemon(true);
4. }
310 - 035
Leading the way in IT testing and certification tools, www.testking.com
-60 -
5.
6. public void run() {
7. (new B()).start();
8. try {
9. Thread.sleep(60000);
10. } catch (InterruptedException x) {}
11. System.out.println(“A done”);
12. }
13.
14. class B extends Thread {
15. public void run() {
16. try {
17. Thread.sleep(60000);
18. } catch (InterruptedException x) {}
19. System.out.println(“B done”);
21. }
22. }
23.
24. public static void main(String[] args) {
25. (new A()).start();
26. }
27. }