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? IllegalStateException None of these ArrayIndexOutOfBoundsException ClassCastException NumberFormatException IllegalStateException None of these ArrayIndexOutOfBoundsException ClassCastException NumberFormatException ANSWER DOWNLOAD EXAMIANS APP
JAVA Exceptions What will be the result of executing the following code?public class Test{ public void divide(int a, int b){ try{ int c = a / b; }catch(Exception e){ System.out.print("Exception "); }finally{ System.out.println("Finally"); } public static void main(String args[]){ Test t = new Test(); t.divide(0,3); }} Compile with error None of these Prints out: Finally Prints out: Exception Prints out: Exception Finally Compile with error None of these Prints out: Finally Prints out: Exception Prints out: Exception Finally ANSWER DOWNLOAD EXAMIANS APP
JAVA Exceptions Which exception is thrown when divide by zero statement executes? None of these ArithmeticException NullPointerException NumberFormatException None of these ArithmeticException NullPointerException NumberFormatException ANSWER DOWNLOAD EXAMIANS APP
JAVA Exceptions The class at the top of exception class hierarchy is ................. Object Throwable Exception ArithmeticException Object Throwable Exception ArithmeticException ANSWER DOWNLOAD EXAMIANS APP
JAVA Exceptions What will be the output?class MyClass{ public String test(){ try{ System.out.print("One"); return ""; } finally{ System.out.print("Two"); } }}public class Test{ public static void main(String args[]){ MyClass m = new MyClass(); m.test(); }} Compilation Error One Two One None of these Two Compilation Error One Two One None of these Two ANSWER DOWNLOAD EXAMIANS APP
JAVA Exceptions Which of the below statement is/are true about Error?A. An Error is a subclass of Throwable.B. An Error is a subclass of Exception.C. Error indicates serious problems that a reasonable application should not try to catch.D. An Error is a subclass of IOException. B and D A and D A and B A and C B and C B and D A and D A and B A and C B and C ANSWER DOWNLOAD EXAMIANS APP