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) {

(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

1 Expert Approved Answer
Step: 1 Unlock

c C... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Advanced Java Programming Questions!