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 default length of textfield ?

1 Answers  


function of extends and implements keywords?

2 Answers  


what is the use of Object Factories?

1 Answers  


In inglish: How to convert jar to exe files? Em português: Como converter arquivos .jar para .exe?

0 Answers  


How JNDI is used in JMS ?

1 Answers  






Why a component architecture for the java platform?

0 Answers  


What is private static final long serialVersionUID = 1L;

3 Answers   Google,


What is the difference between java class and bean?

0 Answers  


Thread life cycle?

3 Answers   TCS,


What is deadlock?

2 Answers  


What is clustering? What are the different algorithms used for clustering?

0 Answers  


what is domain,give me some brief information about that?

1 Answers  


Categories