MCQOPTIONS
Saved Bookmarks
| 1. |
What is the output of this program?public class exception_Example { public static void main(String args[]) { try { int array[] = {11, 21,31 , 41, 51}; for (int k = 0; k < 5; ++k) System.out.print(array[k]); int p = 1/0; } catch(ArrayIndexOutOfBoundsException e) { System.out.print("I"); } catch(ArithmeticException e) { System.out.print("L"); } } } |
| A. | 1121314151L |
| B. | 112131 |
| C. | 1121314151U |
| D. | 112131451 |
| E. | L1121314151 |
| Answer» B. 112131 | |