What’s the Output?
a. What is the output of the following program?
class Test { public static void main(String[ ] args) { try { System.out.println("Started the try block"); int k=0; int j = 2/k; System.out.println("Finishing the try block"); } // Insert Catch Code Here finally { System.out.println("Executing the finally block"); } System.out.println("Program all done"); } }b. What is the output if the comment // Insert Catch Code Here is replaced with the following code?
catch (RuntimeException e) { System.out.println("Am I printed?"); }
We need at least 10 more requests to produce the solution.
0 / 10 have requested this problem solution
The more requests, the faster the answer.