问题详情

11.classa {  12. public void process() { System.out.print(”a,”); } }  13. class b extends a {  14. public void process() throws IOException {  15. super.process();  16. System.out.print(”b,”);  17. throw new IOException();  18. } }  19. public static void main(String[] args) {  20. try { new b().process(); }  21. catch (IOException e) { System.out.println(”Exception”); } }  What is the result?() 


A、 Exception

B、 a,b,Exception

C、 Compilation fails because of an error in line 20.

D、 Compilation fails because of an error in line 14.

E、 A NullPointerException is thrown at runtime.

时间:2022-01-04 17:19 关键词: SCJP程序员认证考试

答案解析

D
相关问题