JAVA Exceptions Which keyword is used to specify the exception thrown by method? throw throws catch finally throw throws catch finally ANSWER DOWNLOAD EXAMIANS APP
JAVA Exceptions Exception generated in try block is caught in ........... block. throws catch throw finally throws catch throw finally ANSWER DOWNLOAD EXAMIANS APP
JAVA Exceptions What is the output of the following program code?public class Test{ public static void main(String args[]){ try{ int i; return; } catch(Exception e){ System.out.print("inCatchBlock"); } finally{ System.out.println("inFinallyBlock"); } }} The program will return without printing anything inCatchBlock inCatchBlock inFinallyBlock inFinallyBlock The program will return without printing anything inCatchBlock inCatchBlock inFinallyBlock inFinallyBlock 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); }} 3 None of these Error occured Compilation Error 3.5 3 None of these Error occured Compilation Error 3.5 ANSWER DOWNLOAD EXAMIANS APP
JAVA Exceptions What will be the result of executing the following code?public class Test{ public void divide(int a, int b){ try{ int c = a / b; }catch(Exception e){ System.out.print("Exception "); }finally{ System.out.println("Finally"); } public static void main(String args[]){ Test t = new Test(); t.divide(0,3); }} Compile with error Prints out: Exception Finally Prints out: Finally None of these Prints out: Exception Compile with error Prints out: Exception Finally Prints out: Finally None of these Prints out: Exception 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 ? None of these Compilation Error false true None of these Compilation Error false true ANSWER DOWNLOAD EXAMIANS APP