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

Define the remote object implementation?

2569


What is a class loader?

2079


What is table mutation and how do you avoid it?

2526


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

1076


Name the eight primitive java types.

1199


If I wanted to use a solarisui for just a jtabbedpane, and the metal ui for everything else, how would I do that?

1128


What is the highest-level event class of the event-delegation model?

1163


Is there a guarantee of uniqueness for entity beans?

1059


What method is invoked to cause an object to begin executing as a separate thread?

1094


Can you give me a simple example of using the requiredif validator rule?

1184


What must a class do to implement an interface?

1282


Is the session factory thread safe?

1233


What restrictions are placed on the values of each case of a switch statement?

1061


What is the difference between the font and fontmetrics classes?

1214


What is prototype?

1259