JAVA Exceptions In which of the following package Exception class exist? java.net java.lang java.util java.io java.file java.net java.lang java.util java.io java.file 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 inCatchBlock inFinallyBlock The program will return without printing anything inCatchBlock inFinallyBlock inCatchBlock inFinallyBlock The program will return without printing anything ANSWER DOWNLOAD EXAMIANS APP
JAVA Exceptions The class at the top of exception class hierarchy is ................. Throwable Exception ArithmeticException Object Throwable Exception ArithmeticException Object 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"); } }} "null pointer exception" is printed. "one" is printed. "exception" is printed. Compilation fails saying NullPointerException has already been caught. None of these "null pointer exception" is printed. "one" is printed. "exception" is printed. Compilation fails saying NullPointerException has already been caught. None of these ANSWER DOWNLOAD EXAMIANS APP
JAVA Exceptions Which exception is thrown when an array element is accessed beyond the array size? None of these ArrayIndexOutOfBoundsException ArrayIndexOutOfBounds ArrayElementOutOfBounds None of these ArrayIndexOutOfBoundsException ArrayIndexOutOfBounds ArrayElementOutOfBounds 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 Compilation Error Error occured 3.5 3 None of these Compilation Error Error occured 3.5 3 ANSWER DOWNLOAD EXAMIANS APP