JAVA Exceptions The class at the top of exception class hierarchy is ................. ArithmeticException Throwable Object Exception ArithmeticException Throwable Object Exception ANSWER DOWNLOAD EXAMIANS APP
JAVA Exceptions Which keyword is used to specify the exception thrown by method? catch throw throws finally catch throw throws finally ANSWER DOWNLOAD EXAMIANS APP
JAVA Exceptions public class Test{ public static void main(String args[]){ try{ int a = Integer.parseInt("four"); } }}Which exception could be handled by the catch block for above? ArrayIndexOutOfBoundsException IllegalStateException ClassCastException NumberFormatException None of these ArrayIndexOutOfBoundsException IllegalStateException ClassCastException NumberFormatException None of these ANSWER DOWNLOAD EXAMIANS APP
JAVA Exceptions Which exception is thrown when an array element is accessed beyond the array size? ArrayElementOutOfBounds ArrayIndexOutOfBoundsException None of these ArrayIndexOutOfBounds ArrayElementOutOfBounds ArrayIndexOutOfBoundsException None of these ArrayIndexOutOfBounds ANSWER DOWNLOAD EXAMIANS APP
JAVA Exceptions Which of the following blocks execute compulsorily whether exception is caught or not. finally throws catch throw finally throws catch throw ANSWER DOWNLOAD EXAMIANS APP
JAVA Exceptions Predict the output:public class Test{ public static void main(String args[]){ try{ String arr[] = new String[10]; arr = null; arr[0] = "one"; System.out.print(arr[0]); }catch(Exception ex){ System.out.print("exception"); }catch(NullPointerException nex){ System.out.print("null pointer exception"); } }} None of these Compilation fails saying NullPointerException has already been caught. "one" is printed. "null pointer exception" is printed. "exception" is printed. None of these Compilation fails saying NullPointerException has already been caught. "one" is printed. "null pointer exception" is printed. "exception" is printed. ANSWER DOWNLOAD EXAMIANS APP