+ 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) ?
4 odpowiedzi
+ 3
Gordie is this quiz wrong for sure or am I missing something?
+ 3
Okay then I'll report it.