问题:
现有:
class ThreadExcept implements Runnable {
public void run() { throw new RuntimeException("exception "); }
public static void main(Stri_ng [] args) {
new Thread (new ThreadExcept()).start();
try {
int x=Integer.parselnt (args [0]);
Thread. sleep (x);
System.out.print("main");
} catch (Exception e) { }
}
}
和命令行: java ThreadExcept l000
哪一个是结果?()
A . main
B . 编译失败
C . main java.lang.RuntimeException: exception
D . 代码运行,但没有输出
现有:
class ThreadExcept implements Runnable {
public void run() { throw new RuntimeException("exception "); }
public static void main(Stri_ng [] args) {
new Thread (new ThreadExcept()).start();
try {
int x=Integer.parselnt (args [0]);
Thread. sleep (x);
System.out.print("main");
} catch (Exception e) { }
}
}
和命令行: java ThreadExcept l000
哪一个是结果?()
● 参考解析
本题暂无解析