To make an object to begin executing as a separate thread,
what method is used?

Answers were Sorted based on User's Feedback



To make an object to begin executing as a separate thread, what method is used?..

Answer / 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

To make an object to begin executing as a separate thread, what method is used?..

Answer / devarathnam c,kotagudibanda(po

Hi...
public void run();method in Runnable interface,which only
one method in Runnable interface.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Advanced Java Interview Questions

What is a task?s priority?

1 Answers  


What is synchronization and why is it important?

0 Answers  


What are the advanatages of RMI ?

1 Answers   HGS,


What is re-entrant. Is session beans reentrant. Is entity beans reentrant?

0 Answers  


If your ui seems to freeze periodically, what might be a likely reason?

0 Answers  


In howmany ways a thread can be created?

3 Answers   HCL,


What is abstract schema?

0 Answers  


whats is mean by tiles in struts

2 Answers   SolutionNET,


What are the services in RMI ?

0 Answers  


cud u help me ... i am struggling with this question... to find all the subsets of a given set for ex.... a,,b,c shud give all the subsets.... i gt the program in c bt nt able to get it in java..... help needed ..

0 Answers  


How to determine SGA site?

0 Answers   Wipro,


Do you think that java should have had pointers?

0 Answers  


Categories