JAVA Exceptions Exception generated in try block is caught in ........... block. throws throw catch finally throws throw catch finally 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); }} Error occured 3.5 3 None of these Compilation Error Error occured 3.5 3 None of these Compilation Error ANSWER DOWNLOAD EXAMIANS APP
JAVA Exceptions Which exception is thrown when an array element is accessed beyond the array size? ArrayElementOutOfBounds None of these ArrayIndexOutOfBoundsException ArrayIndexOutOfBounds ArrayElementOutOfBounds None of these ArrayIndexOutOfBoundsException ArrayIndexOutOfBounds 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 C B and D A and D A and B B and C A and C B and D A and D A and B B and C 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 Compilation Error None of these false true Compilation Error None of these false ANSWER DOWNLOAD EXAMIANS APP
JAVA Exceptions What will be the output?class MyClass{ public String test(){ try{ System.out.print("One"); return ""; } finally{ System.out.print("Two"); } }}public class Test{ public static void main(String args[]){ MyClass m = new MyClass(); m.test(); }} Compilation Error One Two None of these One Two Compilation Error One Two None of these One Two ANSWER DOWNLOAD EXAMIANS APP