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 Exception generated in try block is caught in ........... block. throw catch throws finally throw catch throws finally ANSWER DOWNLOAD EXAMIANS APP
JAVA Exceptions Which exception is thrown when divide by zero statement executes? NullPointerException NumberFormatException None of these ArithmeticException NullPointerException NumberFormatException None of these ArithmeticException ANSWER DOWNLOAD EXAMIANS APP
JAVA Exceptions In which of the following package Exception class exist? java.net java.io java.file java.util java.lang java.net java.io java.file java.util java.lang ANSWER DOWNLOAD EXAMIANS APP
JAVA Exceptions What is the output of the following program code?public class Test{ public static void main(String args[]){ try{ int i; return; } catch(Exception e){ System.out.print("inCatchBlock"); } finally{ System.out.println("inFinallyBlock"); } }} inFinallyBlock inCatchBlock inCatchBlock inFinallyBlock The program will return without printing anything inFinallyBlock inCatchBlock inCatchBlock inFinallyBlock The program will return without printing anything 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(); }} Name-B Value-A Compilation fails-Exception NullPointerException is not compatible with throws clause in Compilation succeed but no output None of these printName() Name-B Value-A Compilation fails-Exception NullPointerException is not compatible with throws clause in Compilation succeed but no output None of these printName() ANSWER DOWNLOAD EXAMIANS APP