现有:classThreadExceptimplementsRunnable{publicvoidrun(){thrownewRuntimeException("ex

题目

现有:classThreadExceptimplementsRunnable{publicvoidrun(){thrownewRuntimeException("exception");}publicstaticvoidmain(String[]args){newThread(newThreadExcept()).start();try{intx=Integer.parseInt(args[0]);Thread.sleep(x);System.out.print("main");}catch(Exceptione){}}}和命令行:javaThreadExcept1000哪一个是结果?()

A.main

B.编译失败

C.代码运行,但没有输出

D.mainjava.lang.RuntimeException:exception

更多“现有:classThreadExceptimplementsRunnable{publicvoidrun(){thrownewRuntimeException("ex ”相关问题