Exception Handling
© examsiri.com
Question : 17 of 24
Marks:
+1,
-0
Given:
Which, inserted independently at // insert code here, will compile, and produce the outputb? (Choose all that apply.)
import java.io.*;
class Master {
  String doFileStuff() throws FileNotFoundException { return "a"; }
}
class Slave extends Master {
  public static void main(String[] args) {
   String s = null;
   try { s = new Slave().doFileStuff();
  } catch ( Exception x) {
   s = "b"; }
   System.out.println(s);
}
  // insert code here
}Which, inserted independently at // insert code here, will compile, and produce the outputb? (Choose all that apply.)
Go to Question: