MCQOPTIONS
Saved Bookmarks
| 1. |
What is the output of this program?public class ExceptionHandling_Example { public static void main(String args[]) { try { int array[] = {10, 20,30 , 40, 50}; for (int K = 0; K < 5; ++K) System.out.print(array[K]); int p = 1/0; } catch(ArrayIndexOutOfBoundsException e) { System.out.print("L"); } catch(ArithmeticException e) { System.out.print("U"); } } } |
| A. | 1020304050 |
| B. | 10203050 |
| C. | 1020304050U |
| D. | 20304050U |
| E. | 304050U |
| Answer» D. 20304050U | |