MCQOPTIONS
Saved Bookmarks
| 1. |
What is the output of this program?public class exception_handlingExample { public static void main(String args[]) { try { int num = 10; for (int k = -1; k < 3 ;++k) num = (num / k); } catch(ArithmeticException e) { System.out.print("0"); } System.out.print(num); } } |
| A. | 10 |
| B. | 3 |
| C. | Compilation Error |
| D. | Runtime Error |
| E. | None of these |
| Answer» D. Runtime Error | |