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

Hello, I'm java developer. My skill is programming with java,jsp, struts, struts2+spring, hibernate, eclipse, tomcat, mysql,Oracle,Middlegen and other open source technology. I'm interest work any web base project that use my ability above. The thing is that I have never got any chance to work in this field though i am very much comfort with my skills. So if any body want me then i will happily join you. Also I have also some of my friends if you. If you interest to outsource any project to me then also you are welcome. you can reach me by email at me4bangalore@yahoo.in

4 Answers  


To what value is a variable of the string type automatically initialized?

0 Answers  


What class is used to create Server side object ?

0 Answers  


What are the types of scaling?

0 Answers  


What does module-relative mean?

0 Answers  






How to add new JTabbed pane?

1 Answers  


What is difference RMI registry and OSAgent?

1 Answers  


Why is main purpose of XML?

5 Answers  


whats is mean by filter?

1 Answers   SolutionNET,


What is Connection Pooling?

1 Answers   Enteg Technologies, Infosys, Polaris,


What is threadfactory?

0 Answers  


Which class is the immediate superclass of the menucomponent class?

0 Answers  


Categories