MCQOPTIONS
Saved Bookmarks
| 1. |
What is the output of this program?class Myexception extends Exception { int Execution; Myexception(int n) { Execution = n; } public String toString() { return "Execution"; } } public class UserDefine_Exception { static void compute (int n) throws Myexception { throw new Myexception(n); } public static void main(String args[]) { try { compute(5); } catch(Myexception e) { System.out.print("User define Exception executed..."); } } } |
| A. | User define Exception executed... |
| B. | Execution |
| C. | Compilation Error |
| D. | Runtime Error |
| E. | None of these |
| Answer» B. Execution | |