JAVA Exceptions The class at the top of exception class hierarchy is ................. Exception Throwable Object ArithmeticException Exception Throwable Object ArithmeticException ANSWER DOWNLOAD EXAMIANS APP
JAVA Exceptions Which of the following blocks execute compulsorily whether exception is caught or not. catch throw finally throws catch throw finally throws ANSWER DOWNLOAD EXAMIANS APP
JAVA Exceptions try{ File f = new File("a.txt");}catch(Exception e){}catch(IOException io){}Is this code create new file name a.txt ? None of these Compilation Error false true None of these Compilation Error false true 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); }} None of these Compile with error Prints out: Exception Finally Prints out: Exception Prints out: Finally None of these Compile with error Prints out: Exception Finally Prints out: Exception Prints out: 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? None of these ArrayIndexOutOfBoundsException ClassCastException IllegalStateException NumberFormatException None of these ArrayIndexOutOfBoundsException ClassCastException IllegalStateException NumberFormatException ANSWER DOWNLOAD EXAMIANS APP
JAVA Exceptions What happen in case of multiple catch blocks? Either super or subclass can be caught first. The superclass exception must be caught first. The superclass exception cannot caught first. None of these Either super or subclass can be caught first. The superclass exception must be caught first. The superclass exception cannot caught first. None of these ANSWER DOWNLOAD EXAMIANS APP