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
What value does readline() return when it has reached the end of a file?
For which statements does it make sense to use a label?
What is the purpose of the finally clause of a try-catch-finally statement?
When is the best time to validate input?
What is a modular application?
What is the map interface?
Why won’t the jvm terminate when I close all the application windows?
What is the difference between java class and bean?
whats is mean by tiles in struts
Explain what is orm?
Brief description about local interfaces?
What is message driven beam?
Describe responsibilities of Activator?
What is the difference between the font and fontmetrics classes?
What are the diff types of exception?