Answer Posted / 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 |
Post New Answer View All Answers
What do you need to set-up a cluster with jboss?
What is permgen or permanent generation?
What is ioc concept?
What are the types of scaling?
Can you give me a simple example of using the requiredif validator rule?
when A client sent a request to the server to open facebook page and close the browser after this request .at that time the same user do login by using a different browser then that session id will exist or not for the same client??
which type of objects reference will be given to client?
Explain the difference between object state and behavior?
What is an abstract method?
If your ui seems to freeze periodically, what might be a likely reason?
Which container method is used to cause a container to be laid out and redisplayed?
Describe responsibilities of Activator?
How messaging services are done, before release of JMS?
How would you create a button with rounded edges?
Why are my checkboxes not being set from on to off?