1.

What is the output of this program?class Myexception extends Exception { int Execution; Myexception(int p) { Execution = p; } public String toString() { return "Execution"; } } public class Result { static void compute (int p) throws Myexception { throw new Myexception(p); } public static void main(String args[]) { try { compute(6); } catch(DevideByZeroException e) { System.out.print("Catch block Executed..."); } } }

A. 6
B. Compilation Error
C. Runtime Error
D. Catch block Executed...
E. None of these
Answer» D. Catch block Executed...


Discussion

No Comment Found

Related MCQs