JAVA Exceptions Which of the following blocks execute compulsorily whether exception is caught or not. finally catch throws throw finally catch throws throw ANSWER DOWNLOAD EXAMIANS APP
JAVA Exceptions What happen in case of multiple catch blocks? Either super or subclass can be caught first. None of these The superclass exception must be caught first. The superclass exception cannot caught first. Either super or subclass can be caught first. None of these The superclass exception must be caught first. The superclass exception cannot caught first. ANSWER DOWNLOAD EXAMIANS APP
JAVA Exceptions In which of the following package Exception class exist? java.file java.net java.lang java.io java.util java.file java.net java.lang 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(); }} printName() None of these Compilation fails-Exception NullPointerException is not compatible with throws clause in Value-A Name-B Compilation succeed but no output printName() None of these Compilation fails-Exception NullPointerException is not compatible with throws clause in Value-A Name-B Compilation succeed but no output ANSWER DOWNLOAD EXAMIANS APP
JAVA Exceptions Which exception is thrown when divide by zero statement executes? ArithmeticException None of these NumberFormatException NullPointerException ArithmeticException None of these NumberFormatException NullPointerException ANSWER DOWNLOAD EXAMIANS APP
JAVA Exceptions Determine output of the following program code?public class Test{ public static void main(String args[]){ int i; try{ i = calculate(); System.out.println(i); }catch(Exception e){ System.out.println("Error occured"); } } static int calculate(){ return (7/2); }} Compilation Error Error occured 3 None of these 3.5 Compilation Error Error occured 3 None of these 3.5 ANSWER DOWNLOAD EXAMIANS APP