一题JAVA基础题~~~请教一下各位,望高人指点
Given:
public class ExceptionTest {
class TestException extends Exception {}
public void runTest () throws TestException {}
public void test () /* Point X*/ {
runTest ();
}
}
At point X on line 4, which code can be added to make the code
compile?
A.throws Exception
B.catch (Exception e)
C.throws RuntimeException
D.catch (TestException e)
E.no code is necessary
我自己选了A 但是不知道对不对~~~请指教~~谢谢