Analyze the following code:
public abstract class Test implements Runnable{
        public void doSomething() { };

A. The program will not compile because it does not implement the run() method.

B. The program will not compile because it does not contain abstract methods.

C. The program compiles fine.

D. None of the above

Answer: Option C

Join The Discussion

Comments ( 2 )

  1. Manish Kumar
    Manish Kumar :
    3 years ago

    since test class is abstract, its not mandatory two implement runnable method

  2. Guhan Boopathi
    Guhan Boopathi :
    5 years ago

    how come this work...because

Related Questions on Threads

What will be the output of the following program code?

A. The program does not compile because this cannot be referenced in a static method.

B. The program compiles fine, but it does not print anything because t does not invoke the run() method

C. The program compiles and runs fine and displays test on the console.

D. None of the above