t 是一個合法的 Thread 對象的引用,并且 t 的合法 run() 方法如下: public void run() { System.out.print("go "); } 及: t.start(); t.start(); t.run(); 哪一個是結果?()
A.go B.go go C.go go go D.go 之后跟著一個異常
A.JMenu B.JMenuBar C.JMenuItem D.以上皆是
class Work implements Runnable { Thread other; Work(Thread other) { this.other = other; } public void run() { try { other.join(); } catch (Exception e) { } System.out.print("after join "); } } class Launch { public static void main(String [] args) { new Thread(new Work(Thread.currentThread())).start(); System.out.print("after start "); } } 結果為:()
A.after join B.after start C.after join after start D.after start after join