Tag Archives: SampleClosable

Given the code fragment: interface SampleClosable { public void close () throws java.io.IOException;

Given the code fragment:interface SampleClosable {public void close () throws java.io.IOException;}Which three implementations are valid? A. Option A B. Option B C. Option C D. Option D E. Option E Correct Answer: A,C,E A: Throwing the same exception is fine.C: Using a subclass of java.io.IOException (here java.io.FileNotFoundException) is fineE: Not using a throw clause is fine.