MCQOPTIONS
Saved Bookmarks
| 1. |
What is the output of this program?public class ExceptionHandling_Example { public static void main(String args[]) { try { int p = 1; int q = 10 / p; try { if (q == 1) p = p / p - p; if (p == 2) { int r[] = {1}; r[8] = 9; } } catch (NullPointerException e) { System.out.println("*****"); } } finally { System.out.print("***"); } } } |
| A. | ***** |
| B. | *** |
| C. | Compilation Error |
| D. | Runtime Error |
| E. | None of these |
| Answer» C. Compilation Error | |