01. class A {
02. public void process() { System.out.print("A,"); }
03. }
04. public class B extends A {
05. public void process() throws IOException {
06. super.process();
07. System.out.print("B,");
08. throw new IOException();
09. }
10.
11. public static void main(String[] args) {
12. try { new B().process(); }
13. catch (IOException e) { System.out.println("Exception"); }
14. }
15. }
Login in to like
Login in to comment