[Solved] Page 1 Question 10 1 Point Examine Following Code Note Print Statements Match Printed Con Q37178395


this is advance java
Page 1: Question 10 (1 point) Examine the following code. Note the print statements and where they are. Match what will be printed with the condition that would cause it. public void sample (String filename) 4 try system.out.print(“A”) doSomethingThatMightThrowAnIOException ); system. out.print(“B”) 10 11 catch (IOException e) system. out.print (“C”) ; system.out.println(“D”) 1. AD y This will be printed if an IOException 2. ABCD occurs y This will be printed if no IOException 3. ABD occurs 4. ACD Question 11 (1 point) Write a catch statement (just the statement, no body or [) braces) that will catch NoSuchFileException. Name the parameter e. (Do NOT just use the generic Exception or you will get no credit.) Show transcribed image text Page 1: Question 10 (1 point) Examine the following code. Note the print statements and where they are. Match what will be printed with the condition that would cause it. public void sample (String filename) 4 try system.out.print(“A”) doSomethingThatMightThrowAnIOException ); system. out.print(“B”) 10 11 catch (IOException e) system. out.print (“C”) ; system.out.println(“D”) 1. AD y This will be printed if an IOException 2. ABCD occurs y This will be printed if no IOException 3. ABD occurs 4. ACD
Question 11 (1 point) Write a catch statement (just the statement, no body or [) braces) that will catch NoSuchFileException. Name the parameter e. (Do NOT just use the generic Exception or you will get no credit.)
Expert Answer
Answer to Page 1: Question 10 (1 point) Examine the following code. Note the print statements and where they are. Match what will … . . .
OR

