Question: Predict the output of the following Java program. (a) Exception 2 (b) Exception 0 (c) Compilation Error (d) None of the above class Test {
Predict the output of the following Java program.![class Test { public static void main (String args[]) { try { } M throw 2; } catch (int e) {](https://dsd5zvtm8ll6.cloudfront.net/images/question_images/1704/7/8/4/230659cf166362681704784228823.jpg)
(a) Exception 2
(b) Exception 0
(c) Compilation Error
(d) None of the above
class Test { public static void main(String args[]) { try { } M throw 2; } catch (int e) { System.out.println ("Exception + e); 11
Step by Step Solution
3.38 Rating (151 Votes )
There are 3 Steps involved in it
c C... View full answer
Get step-by-step solutions from verified subject matter experts
