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 the purpose of the finally clause of a try-catch-finally statement?

0 Answers  


What is meant by Superconductivity?

4 Answers  


Explain the steps in details to load the server object dynamically?

0 Answers  


What are the advanatages of RMI ?

1 Answers   HGS,


How to determine applet?s height and width?

1 Answers  






What is jboss?

0 Answers  


How u validate date in DD/MM/YY format. and how u validate money in ur jsp

3 Answers   Ashok Leyland, Satyam, Tech Mahindra, Tomax,


What do you know about seam?

0 Answers  


What state does a thread enter when it terminates its processing?

0 Answers  


What is the difference between a stub and a skeleton?

9 Answers   ABC, College School Exams Tests, Geoservices, Polaris, Qualcomm, Rajiv Gandhi College of Engineering and Technology RGCET, UTIITSL, Wipro,


What state a thread enters, When it blocks on I/O?

2 Answers  


What invokes a thread?s run() method?

2 Answers  


Categories