JAVA Exceptions Which of the following blocks execute compulsorily whether exception is caught or not. finally throw catch throws finally throw catch throws 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"); } }} inCatchBlock inFinallyBlock inFinallyBlock inCatchBlock The program will return without printing anything inCatchBlock inFinallyBlock inFinallyBlock inCatchBlock The program will return without printing anything ANSWER DOWNLOAD EXAMIANS APP
JAVA Exceptions Which exception is thrown when divide by zero statement executes? None of these NullPointerException NumberFormatException ArithmeticException None of these NullPointerException NumberFormatException ArithmeticException 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 ? Compilation Error true false None of these Compilation Error true false None of these ANSWER DOWNLOAD EXAMIANS APP
JAVA Exceptions Which exception is thrown when an array element is accessed beyond the array size? ArrayIndexOutOfBounds ArrayElementOutOfBounds ArrayIndexOutOfBoundsException None of these ArrayIndexOutOfBounds ArrayElementOutOfBounds ArrayIndexOutOfBoundsException None of these ANSWER DOWNLOAD EXAMIANS APP
JAVA Exceptions Predict the output:public class Test{ public static void main(String args[]){ try{ String arr[] = new String[10]; arr = null; arr[0] = "one"; System.out.print(arr[0]); }catch(Exception ex){ System.out.print("exception"); }catch(NullPointerException nex){ System.out.print("null pointer exception"); } }} None of these Compilation fails saying NullPointerException has already been caught. "exception" is printed. "one" is printed. "null pointer exception" is printed. None of these Compilation fails saying NullPointerException has already been caught. "exception" is printed. "one" is printed. "null pointer exception" is printed. ANSWER DOWNLOAD EXAMIANS APP