+ 6

Please explain this java quiz

What should be the output of this code? import java.util.*; public class test{ public static void main(String [] args) { try{ System.out.println("Welcome world") ; throw new ArithmeticException("welcome") ; } catch(IOException | ArithmeticException e){ System.out.println(e.getMessage()); } } } (a) compile time error (b) runtime exception (c) Welcome world (d) None of these Answer is (d) None of these given in sololearn but it should be (a) compile time error. I can't understand why it is (d) ?

20th Apr 2018, 10:08 AM
Priya
4 Réponses
+ 3
Gordie is this quiz wrong for sure or am I missing something?
20th Apr 2018, 12:16 PM
Priya
+ 3
Okay then I'll report it.
20th Apr 2018, 12:24 PM
Priya