下列代码编译和运行的结果是:()。public class A {public void process() {System.out.print("A,");}public static void main(String[] args) {try {new B().process();} catch (IOException e) {System.out.println("Exception");}}}class B extends A {public void process() throws IOException {super.process();System.out.print("B,");throw new IOException();}}
A:输出Exception
B:输出A,B,Exception
C:编译失败
D:在运行时抛出NullPointer
E:xception异常
发布时间:2024-06-14 20:34:10