JAVA Exceptions Which exception is thrown when divide by zero statement executes? ArithmeticException NumberFormatException NullPointerException None of these ArithmeticException NumberFormatException NullPointerException None of these ANSWER DOWNLOAD EXAMIANS APP
JAVA Exceptions Exception generated in try block is caught in ........... block. throws finally throw catch throws finally throw catch 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 None of these NumberFormatException ClassCastException IllegalStateException ArrayIndexOutOfBoundsException None of these NumberFormatException ClassCastException IllegalStateException 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"); } }} inCatchBlock The program will return without printing anything inCatchBlock inFinallyBlock inFinallyBlock inCatchBlock The program will return without printing anything inCatchBlock inFinallyBlock inFinallyBlock ANSWER DOWNLOAD EXAMIANS APP
JAVA Exceptions In which of the following package Exception class exist? java.net java.lang java.file java.io java.util java.net java.lang java.file java.io java.util 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(); }} Value-A Compilation succeed but no output printName() Compilation fails-Exception NullPointerException is not compatible with throws clause in Name-B None of these Value-A Compilation succeed but no output printName() Compilation fails-Exception NullPointerException is not compatible with throws clause in Name-B None of these ANSWER DOWNLOAD EXAMIANS APP