JAVA Exceptions public class Test{ public static void main(String args[]){ try{ int a = Integer.parseInt("four"); } }}Which exception could be handled by the catch block for above? IllegalStateException ClassCastException NumberFormatException ArrayIndexOutOfBoundsException None of these IllegalStateException ClassCastException NumberFormatException ArrayIndexOutOfBoundsException None of these 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 ? false true Compilation Error None of these false true Compilation Error None of these ANSWER DOWNLOAD EXAMIANS APP
JAVA Exceptions Which keyword is used to explicitly throw an exception? throwing try throw catch throwing try throw catch ANSWER DOWNLOAD EXAMIANS APP
JAVA Exceptions The class at the top of exception class hierarchy is ................. Throwable ArithmeticException Object Exception Throwable ArithmeticException Object Exception ANSWER DOWNLOAD EXAMIANS APP
JAVA Exceptions In which of the following package Exception class exist? java.io java.util java.lang java.file java.net java.io java.util java.lang java.file java.net 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"); } }} Compilation fails saying NullPointerException has already been caught. "null pointer exception" is printed. None of these "exception" is printed. "one" is printed. Compilation fails saying NullPointerException has already been caught. "null pointer exception" is printed. None of these "exception" is printed. "one" is printed. ANSWER DOWNLOAD EXAMIANS APP