Can a thread be a member of another thread?
Answers were Sorted based on User's Feedback
Answer / s.ramesh
import java.util.*;
public class DemoThread extends Thread {
private Thread t = null;
public DemoThread() {
t= new Thread(this, "RacingThread");
t.start();
}
public static void main(String[] args) {
DemoThread dt = new DemoThread();
dt.setName("DemoThread");
dt.start();
}
public void run()
{
while(true)
{
try
{
this.sleep(5000);
}
catch(Exception e)
{
System.out.println("Exception Occured");
}
}
}
}
| Is This Answer Correct ? | 2 Yes | 0 No |
Answer / amalendra
A thread is the smallest executable unit in the system. It
means a thread can start another thread, but it can not be
a member of another thread.
| Is This Answer Correct ? | 1 Yes | 1 No |
Why a client should be multithreading? Explain.
Can I import same package/class twice? Will the jvm load the package twice at runtime?
whats is mean by class.forName() whats the return type of class
int x=5,i=1,y=0; while(i<=5) { y=x++ + ++x; i=i+2; } System.out.println(x); System.out.println(y); System.out.println(i); How to solve this? Please explain!
Can we have more than one action servlet?
Explain phantom read?
What is chat area? Explain.
Explain about thread synchronization inside a monitor?
What is RMI architecture?
can i call multipule form beans in Action class?
which of the following authentication is stronger than the others? a. Http Basic b. Http DIGEST c. Form based
How to get an image from db2 database plz help as soon as possible