Question 26: What must be true for the RunHandler class so that instances of RunHandler can be used as written in the code below:
class
Test {
public static void main(
String[] args) {
Thread t = new Thread(new RunHandler());
t.start();
}
}
Select all valid answers.
a) RunHandler must implement the java.lang.Runnable interface.
b) RunHandler must extend the Thread class.
c) RunHandler must provide a run() method declared as public and returning void.
d) RunHandler must provide an init() method.
The given answer is a and c. I think the answer should only be a since if you say implementing an interface, it already implies that you're implementing the method of that interface.