We implement the following code and receive an error message on the riskyCodeThatWantsToDefer() method call indicating "Unhandled exception type IOException".

public void riskyCodeThatWantsToDefer ( ) throws IOException {
  // some code
}


public void callingMethod() {
  riskyCodeThatWantsToDefer();
}

We realize that the riskyCodeThatWantsToDefer() method has passed exception handling responsibility to callingMethod().
To resolve this error we must modify callingMethod().
Which of the modifications listed below would NOT resolve the error?

All of these answers are correct
  • public static void callingMethod() {
      try {
        riskyCodeThatWantsToDefer();
      }
      catch (IOException e) {
        e.printStackTrace();
      }
    }
    
  • public static void callingMethod() throws IOException {
    
      riskyCodeThatWantsToDefer();
    }
    

There are no hints for this question