Multiple choice technology programming languages

what could be replaced with the "XX" in the following program to compile and run sucessfully? select four choices. class Parent{ public void amethod(int i) throws IOException{ } } public class Child extends Parent{ //XX }

  1. public void amethod(int i) throws FileNotFoundException{ }

  2. public void amethod(int i) throws IOException, RuntimeException{ }

  3. public void amethod(int i) throws RuntimeException{ }

  4. public void amethod(int i) throws Exception{ }

  5. public void amethod(int i) { }

  6. public void amethod(int i) throws Throwable{ }

Reveal answer Fill a bubble to check yourself
A,B,C,E Correct answer
Explanation

When overriding a method that throws IOException, you can: throw no exceptions (E), throw fewer or same checked exceptions (A - FileNotFoundException is subclass of IOException), add unchecked exceptions freely (B, C - RuntimeException is unchecked), but you cannot throw broader checked exceptions (D - Exception, F - Throwable). Options A, B, C, E all follow these rules.