JAVA Exceptions Which of the following blocks execute compulsorily whether exception is caught or not. throws catch finally throw throws catch finally throw ANSWER DOWNLOAD EXAMIANS APP
JAVA Exceptions Which exception is thrown when an array element is accessed beyond the array size? None of these ArrayIndexOutOfBounds ArrayIndexOutOfBoundsException ArrayElementOutOfBounds None of these ArrayIndexOutOfBounds ArrayIndexOutOfBoundsException ArrayElementOutOfBounds ANSWER DOWNLOAD EXAMIANS APP
JAVA Exceptions The class at the top of exception class hierarchy is ................. Object Throwable ArithmeticException Exception Object Throwable ArithmeticException Exception 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? ArrayIndexOutOfBoundsException IllegalStateException NumberFormatException None of these ClassCastException ArrayIndexOutOfBoundsException IllegalStateException NumberFormatException None of these ClassCastException ANSWER DOWNLOAD EXAMIANS APP
JAVA Exceptions Which keyword is used to explicitly throw an exception? try throwing throw catch try throwing throw catch ANSWER DOWNLOAD EXAMIANS APP
JAVA Exceptions What is the output for the below code ?import java.io.FileNotFoundException;class A{ public void printName() throws FileNotFoundException{ System.out.println("Value-A"); }}class B extends A{ public void printName() throws NullPointerException{ System.out.println("Name-B"); }}public class Test{ public static void main (String[] args) throws Exception{ A a = new B(); a.printName(); }} Compilation succeed but no output printName() Value-A None of these Name-B Compilation fails-Exception NullPointerException is not compatible with throws clause in Compilation succeed but no output printName() Value-A None of these Name-B Compilation fails-Exception NullPointerException is not compatible with throws clause in ANSWER DOWNLOAD EXAMIANS APP