问题:
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 joi
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 ");
} }
结果为:()
● 参考解析
本题暂无解析
相关内容
相关标签