JAVA Exceptions In which of the following package Exception class exist? java.lang java.file java.util java.io java.net java.lang java.file java.util java.io java.net 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. A and C A and B A and D B and C B and D A and C A and B A and D B and C B and D 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 None of these Two One One Two Compilation Error None of these Two One One Two ANSWER DOWNLOAD EXAMIANS APP
JAVA Exceptions Which keyword is used to explicitly throw an exception? catch throw throwing try catch throw throwing try ANSWER DOWNLOAD EXAMIANS APP
JAVA Exceptions Which exception is thrown when an array element is accessed beyond the array size? None of these ArrayElementOutOfBounds ArrayIndexOutOfBoundsException ArrayIndexOutOfBounds None of these ArrayElementOutOfBounds ArrayIndexOutOfBoundsException ArrayIndexOutOfBounds 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); }} Prints out: Finally Prints out: Exception Finally Prints out: Exception None of these Compile with error Prints out: Finally Prints out: Exception Finally Prints out: Exception None of these Compile with error ANSWER DOWNLOAD EXAMIANS APP