Examveda
Examveda

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


This Question Belongs to Java Program >> Threads

Join The Discussion

Comments ( 2 )

  1. Manish Kumar
    Manish Kumar :
    5 years ago


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

  2. Guhan Boopathi
    Guhan Boopathi :
    7 years ago

    how come this work...because

Related Questions on Threads

What is a thread in Java?

A. A lightweight process that runs independently within a program

B. A data structure to store variables

C. A type of loop

D. A synchronization mechanism