1. System.out.print("Start "); try { System.out.print("Hello world"); throw new FileNotFoundException(); } System.out.print(" Catch Here "); / Line 7 / catch(EOFException e) { System.out.print("End of file exception"); } catch(FileNotFoundException e) { System.out.print("File not found"); } and given that EOFException and FileNotFoundException are both subclasses of IOException, and further assuming this block of code is placed into a class, which statement is most true concerning this code?





Write Comment

Type in
(Press Ctrl+g to toggle between English and the chosen language)

Comments

Tags
Show Similar Question And Answers
QA->A computer has 8 MB in main memory, 128 KB cache with block size of 4KB. If direct mapping scheme is used, how many different main memory blocks can map into a given physical cache block?....
QA->There are 50 students in a class. In a class test 22 students get 25 marks each, 18 students get 30 marks each. Each of the remaining gets 16 marks. The average mark of the whole class is :....
QA->In a class of 20 students the average age is 16 years.If the age of the class teacher is added to that of students,the average age of the class becomes 17 years.What is the age of the teacher?....
QA->If one wants to throw a cricket ball to the maximum distance, then at which angle should he throw it....
QA->If one wants to throw a cricket ball to the maximum distance; then at which angle should he throw it?....
MCQ->System.out.print("Start "); try { System.out.print("Hello world"); throw new FileNotFoundException(); } System.out.print(" Catch Here "); / Line 7 / catch(EOFException e) { System.out.print("End of file exception"); } catch(FileNotFoundException e) { System.out.print("File not found"); } and given that EOFException and FileNotFoundException are both subclasses of IOException, and further assuming this block of code is placed into a class, which statement is most true concerning this code?....
MCQ->import java.io.; public class MyProgram { public static void main(String args[]) { FileOutputStream out = null; try { out = new FileOutputStream("test.txt"); out.write(122); } catch(IOException io) { System.out.println("IO Error."); } finally { out.close(); } } } and given that all methods of class FileOutputStream, including close(), throw an IOException, which of these is true?....
MCQ->What will be the output of the program? public class Test { public static void aMethod() throws Exception { try / Line 5 / { throw new Exception(); / Line 7 / } finally / Line 9 / { System.out.print("finally "); / Line 11 / } } public static void main(String args[]) { try { aMethod(); } catch (Exception e) / Line 20 / { System.out.print("exception "); } System.out.print("finished"); / Line 24 / } }....
MCQ->What will be the output of the program? public class X { public static void main(String [] args) { try { badMethod(); / Line 7 / System.out.print("A"); } catch (Exception ex) / Line 10 / { System.out.print("B"); / Line 12 / } finally / Line 14 / { System.out.print("C"); / Line 16 / } System.out.print("D"); / Line 18 / } public static void badMethod() { throw new RuntimeException(); } }....
MCQ->What will be the output of the program? public class X { public static void main(String [] args) { try { badMethod(); System.out.print("A"); } catch (RuntimeException ex) / Line 10 / { System.out.print("B"); } catch (Exception ex1) { System.out.print("C"); } finally { System.out.print("D"); } System.out.print("E"); } public static void badMethod() { throw new RuntimeException(); } }....
Terms And Service:We do not guarantee the accuracy of available data ..We Provide Information On Public Data.. Please consult an expert before using this data for commercial or personal use
DMCA.com Protection Status Powered By:Omega Web Solutions
© 2002-2017 Omega Education PVT LTD...Privacy | Terms And Conditions