R
Q. What will be the output of the following Java code? class exception_handling { public static void main(String args[]) { try { int a = args.length; int b = 10 / a; System.out.print(a); try { if (a == 1) a = a / a - a; if (a == 2) { int c = {1}; c[8] = 9; } } catch (ArrayIndexOutOfBoundException e) { System.out.println("TypeA"); } catch (ArithmeticException e) { System.out.println("TypeB"); } } } } Note : Execution command line : $ java exception_handling one
No solution found for this question.
Add Solution and get +2 points.
You must be Logged in to update hint/solution
Q. How to get the class object of associated class using Reflection?
Q. Java is a ........... language.
Q. Jar in java stands for ___.
Q. What is the output of the following program ?
Q. Which of these packages contains all the classes and methods required for even handling in Java?
Discusssion
Login to discuss.