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

Can I run seam outside of jboss as?

1114


How messaging services are done, before release of JMS?

2224


How will you pass parameters in RMI? Why do you serialize?

1316


What do you know about seam?

1130


Are we allowed to change the transaction isolation property in middle of a transaction?

1078


What is the relationship between local interfaces and container-managed relationships?

1186


How would you create a button with rounded edges?

1244


What is ioc concept & explain it?

1138


What is the difference between system.out ,system.err and system.in?

1162


What is the difference between the font and fontmetrics classes?

1215


What is the difference between session and entity beans?

1175


What are the purpose of introspection?

1261


What is Stream Tokenizer?

2323


If we opened Windows Internet Explorer 4 times, does it starts 4 processes or 4 threads?

2251


What is the difference between static and non-static with examples?

1999