To make an object to begin executing as a separate thread,
what method is used?
Answer Posted / 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 |
Post New Answer View All Answers
Define the remote object implementation?
What is a class loader?
What is table mutation and how do you avoid it?
What value does read() return when it has reached the end of a file?
Name the eight primitive java types.
If I wanted to use a solarisui for just a jtabbedpane, and the metal ui for everything else, how would I do that?
What is the highest-level event class of the event-delegation model?
Is there a guarantee of uniqueness for entity beans?
What method is invoked to cause an object to begin executing as a separate thread?
Can you give me a simple example of using the requiredif validator rule?
What must a class do to implement an interface?
Is the session factory thread safe?
What restrictions are placed on the values of each case of a switch statement?
What is the difference between the font and fontmetrics classes?
What is prototype?