多项选择题
A.run B.join C.sleep D.start
class Order implements Runnable { public void run() { try { Thread.sleep(2000); } catch (Exception e) { } System.out.print("in "); } public static void main(String [] args) { Thread t = new Thread(new Order()); t.start(); System.out.print("pre "); try { t.join(); } catch (Exception e) { } System.out.print("post "); } } 可产生哪两项结果?()
A.in pre B.pre in C.in pre post D.pre in post
A.yield() B.sleep(long msec) C.go() D.stop()
A.run() B.join() C.wait() D.notify()
微信扫一扫,加关注免费搜题