JAVA Exceptions Which of the following blocks execute compulsorily whether exception is caught or not. catch throws finally throw catch throws finally throw ANSWER DOWNLOAD EXAMIANS APP
JAVA Exceptions Which of the below statement is/are true about Error?A. An Error is a subclass of Throwable.B. An Error is a subclass of Exception.C. Error indicates serious problems that a reasonable application should not try to catch.D. An Error is a subclass of IOException. A and B A and C B and D B and C A and D A and B A and C B and D B and C A and D 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 3 Error occured None of these 3.5 Compilation Error 3 Error occured None of these 3.5 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? NumberFormatException IllegalStateException None of these ArrayIndexOutOfBoundsException ClassCastException NumberFormatException IllegalStateException None of these ArrayIndexOutOfBoundsException ClassCastException ANSWER DOWNLOAD EXAMIANS APP
JAVA Exceptions Which keyword is used to explicitly throw an exception? throw throwing try catch throw throwing try catch 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