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 portable component?

0 Answers  


What is preemptive and Non-preemptive Time Scheduling?

6 Answers   Cognizant,


String is immutable.it is true String can be change to mutable How?

6 Answers   IBM, Professional Access, TCS,


difference between applicationserver and webserver

4 Answers   SolutionNET,


What are JTA/JTS and how they used by client?

0 Answers  






what is the use of State Factories?

0 Answers  


what is JTS?

1 Answers  


How would you detect a keypress in a jcombobox?

0 Answers  


Is a class a subclass of itself?

0 Answers  


What is ioc concept & explain it?

0 Answers  


In a multitiered application which tier is the browser in?

10 Answers   Adobe,


What is difference RMI registry and OSAgent?

1 Answers  


Categories