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 is the purpose of the notify() method?
what are RemoteObjects?
Can I have an action without a form?
whats is statement and procedure
What are JTA/JTS and how they used by client?
Define the remote object implementation?
How would you detect a keypress in a jcombobox?
What is threadfactory?
wahts is mean by dynavalidatorform in struts/
what is the use of State Factories?
What is the diffrence between a local-tx-datasource and a xa-datasource? Can you use transactions in both?
Are we allowed to change the transaction isolation property in middle of a transaction?
In inglish: How to convert jar to exe files? Em português: Como converter arquivos .jar para .exe?
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??
What is a sessionfactory? Is it a thread-safe object?