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 None of these false Compilation Error true None of these false ANSWER DOWNLOAD EXAMIANS APP
JAVA Exceptions In which of the following package Exception class exist? java.lang java.io java.file java.util java.net java.lang java.io java.file java.util java.net ANSWER DOWNLOAD EXAMIANS APP
JAVA Exceptions What will be the output of the following piece of code:class Person{ public void talk() {}}public class Test{ public static void main(String args[]){ Person p = null; try{ p.talk(); } catch(NullPointerException e){ System.out.print("There is a NullPointerException. "); } catch(Exception e){ System.out.print("There is an Exception. "); } System.out.print("Everything went fine. "); }} This code will not compile, because in Java there are no pointers. There is a NullPointerException. Everything went fine. There is a NullPointerException. There is an Exception. There is a NullPointerException. This code will not compile, because in Java there are no pointers. There is a NullPointerException. Everything went fine. There is a NullPointerException. There is an Exception. There is a NullPointerException. ANSWER DOWNLOAD EXAMIANS APP
JAVA Exceptions Which exception is thrown when an array element is accessed beyond the array size? None of these ArrayElementOutOfBounds ArrayIndexOutOfBoundsException ArrayIndexOutOfBounds None of these ArrayElementOutOfBounds ArrayIndexOutOfBoundsException ArrayIndexOutOfBounds ANSWER DOWNLOAD EXAMIANS APP
JAVA Exceptions What happen in case of multiple catch blocks? The superclass exception cannot caught first. Either super or subclass can be caught first. The superclass exception must be caught first. None of these The superclass exception cannot caught first. Either super or subclass can be caught first. The superclass exception must be caught first. None of these 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"); } }} inFinallyBlock inCatchBlock The program will return without printing anything inCatchBlock inFinallyBlock inFinallyBlock inCatchBlock The program will return without printing anything inCatchBlock inFinallyBlock ANSWER DOWNLOAD EXAMIANS APP