What will be the result of the compilation and execution of the following code?

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. }

Follow CodeGalaxy

Mobile Beta

Get it on Google Play
Send Feedback
Keep exploring
Java quizzes
Cosmo
Sign Up Now
or Subscribe for future quizzes