JAVA Exceptions Which of the following blocks execute compulsorily whether exception is caught or not. catch throw throws finally catch throw throws finally 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(); }} printName() Compilation succeed but no output Name-B None of these Value-A Compilation fails-Exception NullPointerException is not compatible with throws clause in printName() Compilation succeed but no output Name-B None of these Value-A Compilation fails-Exception NullPointerException is not compatible with throws clause in ANSWER DOWNLOAD EXAMIANS APP
JAVA Exceptions In which of the following package Exception class exist? java.util java.file java.lang java.net java.io java.util java.file java.lang java.net java.io ANSWER DOWNLOAD EXAMIANS APP
JAVA Exceptions Which keyword is used to explicitly throw an exception? throw catch throwing try throw catch throwing try 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 ? true false None of these Compilation Error true false None of these Compilation Error ANSWER DOWNLOAD EXAMIANS APP
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