Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

What value does readline() return when it has reached the end of a file?

1035


For which statements does it make sense to use a label?

1016


What is the purpose of the finally clause of a try-catch-finally statement?

984


When is the best time to validate input?

1062


What is a modular application?

1012


What is the map interface?

1080


Why won’t the jvm terminate when I close all the application windows?

1191


What is the difference between java class and bean?

1028


whats is mean by tiles in struts

2143


Explain what is orm?

1067


Brief description about local interfaces?

1191


What is message driven beam?

1002


Describe responsibilities of Activator?

2171


What is the difference between the font and fontmetrics classes?

1083


What are the diff types of exception?

1003