To make an object to begin executing as a separate thread,
what method is used?
Answer Posted / anonymous
Public void run() ---- method should be used.
myClass mc= new myClass();
Thread t1= new Thread(mc);
thatClass tc= new thatClass();
Thread t2= new Thread(tc);
t1.run();
t2.run();
Two Objects
Two Threads
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
Have you used threads in Servelet?
How can I scroll through list of pages like the search results in google?
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
Is the ternary operator written x : y ? Z or x ? Y : z ?
what is Activation Instantinator?
Can you give me a simple example of using the requiredif validator rule?
What is Remote Server?
Should synchronization primitives be used on bean methods?
Can I run seam outside of jboss as?
What is ioc concept?
How messaging services are done, before release of JMS?
What is table mutation and how do you avoid it?
What you mean by COM and DCOM?
How are the elements of a cardlayout organized?
Are we allowed to change the transaction isolation property in middle of a transaction?