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?
difference between ejb,struts,hibernate,spring and jsp
What are the services in RMI ?
What is the difference between system.out ,system.err and system.in?
What is scalable, portability in the view of J2EE?
When is the best time to validate input?
When a thread blocks on i/o, what state does it enter?
hi friends, i have done my BE(CSE)at 2011 then i have joined one company before they asked me 50k so i paid but now they telling no project here so we r going to close like that so now i need any job i have good knowledge in core java and j2ee(jsp,servlet,jdbc) so if u know any job pl help me
What is a session? Can you share a session object between different theads?
In RMI, inorder to sent the stub reference to the client, is we have to load the server object first into the memory or can we directly sent reference to the client?
What modifiers may be used with an inner class that is a member of an outer class?
Can I import same package/class twice? Will the jvm load the package twice at runtime?
What’s jboss cache in short?
Name the eight primitive java types.
Can I map more than one table in a cmp?