JAVA Exceptions The class at the top of exception class hierarchy is ................. Throwable ArithmeticException Object Exception Throwable ArithmeticException Object Exception 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 None of these printName() Compilation succeed but no output Compilation fails-Exception NullPointerException is not compatible with throws clause in Value-A Name-B None of these printName() Compilation succeed but no output Compilation fails-Exception NullPointerException is not compatible with throws clause in Value-A ANSWER DOWNLOAD EXAMIANS APP
JAVA Exceptions Which exception is thrown when divide by zero statement executes? NumberFormatException None of these NullPointerException ArithmeticException NumberFormatException None of these NullPointerException ArithmeticException ANSWER DOWNLOAD EXAMIANS APP
JAVA Exceptions try{ File f = new File("a.txt");}catch(Exception e){}catch(IOException io){}Is this code create new file name a.txt ? Compilation Error None of these true false Compilation Error None of these true false ANSWER DOWNLOAD EXAMIANS APP
JAVA Exceptions Which keyword is used to explicitly throw an exception? try catch throwing throw try catch throwing throw ANSWER DOWNLOAD EXAMIANS APP
JAVA Exceptions Exception generated in try block is caught in ........... block. finally throws catch throw finally throws catch throw ANSWER DOWNLOAD EXAMIANS APP