JAVA Exceptions Which keyword is used to explicitly throw an exception? throw try throwing catch throw try throwing catch 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"); } }} "null pointer exception" is printed. Compilation fails saying NullPointerException has already been caught. "one" is printed. "exception" is printed. None of these "null pointer exception" is printed. Compilation fails saying NullPointerException has already been caught. "one" is printed. "exception" is printed. None of these ANSWER DOWNLOAD EXAMIANS APP
JAVA Exceptions Which exception is thrown when divide by zero statement executes? NumberFormatException ArithmeticException None of these NullPointerException NumberFormatException ArithmeticException None of these NullPointerException ANSWER DOWNLOAD EXAMIANS APP
JAVA Exceptions Which keyword is used to specify the exception thrown by method? catch finally throws throw catch finally throws throw ANSWER DOWNLOAD EXAMIANS APP
JAVA Exceptions The class at the top of exception class hierarchy is ................. ArithmeticException Throwable Exception Object ArithmeticException Throwable Exception Object ANSWER DOWNLOAD EXAMIANS APP
JAVA Exceptions Exception generated in try block is caught in ........... block. catch finally throw throws catch finally throw throws ANSWER DOWNLOAD EXAMIANS APP