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

Слідкуй за CodeGalaxy

Мобільний додаток Beta

Get it on Google Play
Зворотній Зв’язок
Продовжуйте вивчати
тести з Java
Cosmo
Зареєструйся Зараз
або Підпишись на майбутні тести