public class Test { public static void main(String[] args) { try { method(); System.out.println("After the method call"); } catc
h (ArithmeticException ex) { System.out.println("ArithmeticException"); } catch (RuntimeException ex) { System.out.println("RuntimeException"); } catch (Exception e) { System.out.println("Exception"); } } static void method() throws Exception { System.out.println(1 / 0); } }
1 answer:
Answer:
"ArithmeticException" is the correct answer for the above question.
Explanation:
Missing Information : The above question does not hold that "what is the output of the program".
- The above question has a class that holds the two functions one function is the main function which calls the other function in a try-catch block.
- The method function holds one run time exception which is 1/0 which is an arithmetic exception.
- It can be handle by the help of an arithmetic class object which is defined in the first catch block.
- Hence the print function of this catch is executed and prints "ArithmeticException".
You might be interested in
Answer:
1) Horizontal
2) Insert
3) Adjustment
4) Cell Style
5) Option-numeric
Explanation:
Thomas edison is the answer
You can get more points by answering questions, and completing challanges.
I hope this helps!
-LizzyIsTheQueen
Answer:
While checking the server utilizations, she should review CPU and RAM.
Explanation: