JAVA Exceptions Which exception is thrown when divide by zero statement executes? ArithmeticException NullPointerException NumberFormatException None of these ArithmeticException NullPointerException NumberFormatException None of these 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); }} None of these 3.5 3 Error occured Compilation Error None of these 3.5 3 Error occured Compilation Error ANSWER DOWNLOAD EXAMIANS APP
JAVA Exceptions Exception generated in try block is caught in ........... block. catch throws throw finally catch throws throw finally 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 The class at the top of exception class hierarchy is ................. Exception ArithmeticException Throwable Object Exception ArithmeticException Throwable Object 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); }} Prints out: Finally None of these Prints out: Exception Finally Compile with error Prints out: Exception Prints out: Finally None of these Prints out: Exception Finally Compile with error Prints out: Exception ANSWER DOWNLOAD EXAMIANS APP