21.  Which method registers a thread in a thread scheduler ?


start();
construct();
register();
run();


Answer

 Option

No answer description available for this question.

Workspace

Report
Mail id: Report Error:

Answer Workspace Report

22.  Which will contain the body of the thread ?


stop();
run();
main();
start();


Answer

 Option

No answer description available for this question.

Workspace

Report
Mail id: Report Error:

Answer Workspace Report

23.  Which of these class is used to make a thread ?


String
System
Thread
Runnable


Answer

 Option

Thread class is used to make threads in java, Thread encapsulates a thread of execution. To create a new thread the program will either extend Thread or implement the Runnable interface.

Workspace

Report
Mail id: Report Error:

Answer Workspace Report

24.  What is the name of the thread in output of this program ?
class multithreaded_programming
{
public static void main(String args[])
{
Thread t = Thread.currentThread();
System.out.println(t);
}
}


system
main
java
thread


Answer

 Option

No answer description available for this question.

Workspace

Report
Mail id: Report Error:

Answer Workspace Report

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


The program will not compile because it does not implement the run() method.
The program will not compile because it does not contain abstract methods.
The program compiles fine.
None of the above


Answer

 Option

No answer description available for this question.

Workspace

Report
Mail id: Report Error:

Answer Workspace Report