Consider following example:
public interface Printable { void abc() throws IOException; } public interface Writable { void abc() throws FileNotFoundException; } public class Implementation implements Printable, Writable { // insert code { /*implementation*/ } }
Which of the following statement(s) can you insert in place of "// insert code" comment?
abc()
throws IOExceptionabc()
throws FileNotFoundExceptionabc()
throws FileNotFoundException, IOExceptionabc()
throws IOException, FileNotFoundExceptionB
Since FileNotFoundException is a subtype of IOException, it satisfies both methods.