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...

How many ways can a thread be used?

Answer Posted / muruganantham

Two ways we can using in Thread. One is Thread class and
another one is Runnable interface. If we are using extends
Thread class means you must override the run() method. We
can create a thread object after that we used start method.
Its only one waiting (wait())thread can be executed
Ex:
Thread t=new Thread();
t.start();

If we are using implement Runnable Interface means you need
not override the run() method. We can passing the parameter
is thread . Its more than one waiting (wait())thread can be
executed.


Hi
This is Muruga. Sorry for gramatical mistake bze that my
level. If any feed back pl reply to my mail id
sunjavamuruga@gmail.com

Is This Answer Correct ?    8 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what is a non-repeatable read?

2321


Write a program to show synchronization?

1088


What is the difference between RMI registry and OS Agent?

1074


How are commas used in the intialization and iteration parts of a for statement?

1050


Should synchronization primitives be used on bean methods?

1004


What is the relation between the infobus and rmi?

953


Which container method is used to cause a container to be laid out and redisplayed?

1092


What are the types of scaling?

1048


What classes of exceptions may be caught by a catch clause?

978


Explain about local interfaces.

1007


Which containers use a border layout as their default layout?

1076


What is permgen or permanent generation?

968


why static class in java

1721


What are the call back methods in entity bean?

1011


Explain about RMI Architecture?

1028