JAVA Exceptions Which exception is thrown when an array element is accessed beyond the array size? ArrayIndexOutOfBoundsException ArrayElementOutOfBounds ArrayIndexOutOfBounds None of these ArrayIndexOutOfBoundsException ArrayElementOutOfBounds ArrayIndexOutOfBounds None of these 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(); }} Two Compilation Error One None of these One Two Two Compilation Error One None of these 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? NumberFormatException IllegalStateException None of these ArrayIndexOutOfBoundsException ClassCastException NumberFormatException IllegalStateException None of these ArrayIndexOutOfBoundsException ClassCastException ANSWER DOWNLOAD EXAMIANS APP
JAVA Exceptions Which of the following blocks execute compulsorily whether exception is caught or not. finally catch throws throw finally catch throws throw ANSWER DOWNLOAD EXAMIANS APP
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[]){ }} ExceptionInInitializerError is thrown ArrayIndexOutOfBoundsException is thrown IllegalStateException is thrown None of these StackOverflowException is thrown ExceptionInInitializerError is thrown ArrayIndexOutOfBoundsException is thrown IllegalStateException is thrown None of these StackOverflowException is thrown ANSWER DOWNLOAD EXAMIANS APP
JAVA Exceptions Which keyword is used to specify the exception thrown by method? finally catch throws throw finally catch throws throw ANSWER DOWNLOAD EXAMIANS APP