Given:
interface Doable {
public void doSomething (String s);
}
Which two class definitions compile?
A.
public abstract class Task implements Doable {
public void doSomethingElse(String s) { }
}
B.
public abstract class Work implements Doable {
public abstract void doSomething(String s) { }
public void doYourThing(Boolean b) { }
}
C.
public class Job implements Doable {
public void doSomething(Integer i) { }
}
D.
public class Action implements Doable {
public void doSomething(Integer i) { }
public String doThis(Integer j) { }
}
E.
public class Do implements Doable {
public void doSomething(Integer i) { }
public void doSomething(String s) { }
public void doThat (String s) { }
}
A, E
A,E
A, E
A, E is correct