JAVA Exceptions Exception generated in try block is caught in ........... block. finally throw catch throws finally throw catch throws ANSWER DOWNLOAD EXAMIANS APP
JAVA Exceptions Which keyword is used to explicitly throw an exception? throw throwing catch try throw throwing catch try ANSWER DOWNLOAD EXAMIANS APP
JAVA Exceptions What will be the output?class MyClass{ public String test(){ try{ System.out.print("One"); return ""; } finally{ System.out.print("Two"); } }}public class Test{ public static void main(String args[]){ MyClass m = new MyClass(); m.test(); }} One Two Two None of these One Compilation Error One Two Two None of these One Compilation Error 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 ? None of these true Compilation Error false None of these true Compilation Error false ANSWER DOWNLOAD EXAMIANS APP
JAVA Exceptions Which exception is thrown when an array element is accessed beyond the array size? None of these ArrayIndexOutOfBounds ArrayElementOutOfBounds ArrayIndexOutOfBoundsException None of these ArrayIndexOutOfBounds ArrayElementOutOfBounds ArrayIndexOutOfBoundsException ANSWER DOWNLOAD EXAMIANS APP
JAVA Exceptions Given the code. What is the result when this program is executed?public class Test{ static int x[]; static{ x[0] = 1; } public static void main(String args[]){ }} ArrayIndexOutOfBoundsException is thrown StackOverflowException is thrown None of these IllegalStateException is thrown ExceptionInInitializerError is thrown ArrayIndexOutOfBoundsException is thrown StackOverflowException is thrown None of these IllegalStateException is thrown ExceptionInInitializerError is thrown ANSWER DOWNLOAD EXAMIANS APP