Which two actions, used independently, will permit this class to compile?

Given: Which two actions, used independently, will permit this class to compile?

Given: Which two actions, used independently, will permit this class to compile?

A.
Adding throws IOException to the main() method signature and changing the catch
argument to IOException

B.
Adding throws IOException to the dosomething() method signature and changing the
catch argument to IOException

C.
Adding throws IOException to the main() method signature and to the dosomething()
method

D.
Adding throws IOException to the main() method signature

E.
Adding throws IOException to the doSoomething() method signature



Leave a Reply 2

Your email address will not be published. Required fields are marked *


imyrta

imyrta

Answer: B, C

A is wrong because doSomething() needs to throw the IOException.
D is wrong for the same reason as A.
E is wrong because in this case the is case IOException is not catch or thrown int the main method.