JAVA Exceptions Given the code. What is the result when this program is executed?public class Test{ static int x[]; static{ x[0] = 1; } public static void main(String args[]){ }} None of these IllegalStateException is thrown StackOverflowException is thrown ExceptionInInitializerError is thrown ArrayIndexOutOfBoundsException is thrown None of these IllegalStateException is thrown StackOverflowException is thrown ExceptionInInitializerError is thrown ArrayIndexOutOfBoundsException is thrown ANSWER DOWNLOAD EXAMIANS APP
JAVA Exceptions Which of the following blocks execute compulsorily whether exception is caught or not. throws finally throw catch throws finally throw catch 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(); }} None of these Two One Compilation Error One Two None of these Two One Compilation Error One Two 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 IllegalStateException NumberFormatException ClassCastException ArrayIndexOutOfBoundsException None of these IllegalStateException NumberFormatException ClassCastException ArrayIndexOutOfBoundsException ANSWER DOWNLOAD EXAMIANS APP
JAVA Exceptions Which exception is thrown when an array element is accessed beyond the array size? ArrayIndexOutOfBoundsException ArrayIndexOutOfBounds None of these ArrayElementOutOfBounds ArrayIndexOutOfBoundsException ArrayIndexOutOfBounds None of these ArrayElementOutOfBounds 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 C 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 ANSWER DOWNLOAD EXAMIANS APP