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
Difference between DurableSubscription and non- DurableSubscription?
How would you create a button with rounded edges?
what is handle?
what is an isolation level?
Which javutil classes and interfaces support event handling?
A user of a web application sees a jsessionid argument in the URL whenever a resource is accessed. What does this mean? a. The form must have the field jsessionid b. URL rewriting is used as the session method c. Cookies are used for managing sessions
Why a client should be multithreading? Explain.
What is the difference between a menuitem and a checkboxmenuitem?
What happens when a thread cannot acquire a lock on an object?
What are the purpose of introspection?
whats is mean by connectionpooling
what is the use of State Factories?
How primary key is implemented in Oracle?
Why does the option tag render selected=selected instead of just selected?
What are the steps to write p-to-p model application?