试题详情
- 单项选择题 public class A extends Thread { A() { setDaemon(true); } public void run() { (new B()).start(); try { Thread.sleep(60000); } catch (InterruptedException x) {} System.out.println(“A done”); } class B extends Thread { public void run() { try { Thread.sleep(60000); } catch (InterruptedException x) {} System.out.println(“B done”); } } public static void main(String[] args) { (new A()).start(); } } What is the result?()
A、 A done
B、 B done
C、 A done B done
D、 B done A done
E、 There is no exception that the application will print anything.
F、 The application outputs “A done” and “B done”, in no guaranteed order.
- B
关注下方微信公众号,在线模考后查看
热门试题