JAVA Exceptions The class at the top of exception class hierarchy is ................. Exception Object Throwable ArithmeticException Exception Object Throwable 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 None of these Two One Compilation Error One Two None of these Two One ANSWER DOWNLOAD EXAMIANS APP
JAVA Exceptions Which keyword is used to specify the exception thrown by method? finally throws catch throw finally throws catch throw 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 Prints out: Exception Finally Compile with error Prints out: Finally Prints out: Exception None of these Prints out: Exception Finally Compile with error Prints out: Finally Prints out: Exception ANSWER DOWNLOAD EXAMIANS APP
JAVA Exceptions Determine output of the following program code?public class Test{ public static void main(String args[]){ int i; try{ i = calculate(); System.out.println(i); }catch(Exception e){ System.out.println("Error occured"); } } static int calculate(){ return (7/2); }} Error occured None of these 3 3.5 Compilation Error Error occured None of these 3 3.5 Compilation Error ANSWER DOWNLOAD EXAMIANS APP
JAVA Exceptions In which of the following package Exception class exist? java.file java.net java.io java.lang java.util java.file java.net java.io java.lang java.util ANSWER DOWNLOAD EXAMIANS APP