Question: What will be the output of the program? (a) Compilation error. (b) finished (c) Exception (d) Arithmetic Exception public class Test { public static void

What will be the output of the program?public class Test { public static void main(String[] args) { try { 3 int x = 0; int y = 5 / x;

(a) Compilation error.
(b) finished
(c) Exception
(d) Arithmetic Exception

public class Test { public static void main(String[] args) { try { 3 int x = 0; int y = 5 x; System.out.println("finished"); } catch (ArithmeticException e) { System.out.println("Exception"); } catch (Exception e) { System.out.println("Arithmetic } Exception");

Step by Step Solution

3.49 Rating (156 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock 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!