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

What is more advisable to create a thread, by implementing
a Runnable interface or by extending Thread class?

Answer Posted / bindhu solomon

Creating a thread using implementing Runnable interface
are more advisable. Suppose we are creating a thread by
extending a thread class, we cannot extend any other class.
If we create a thread by implementing Runnable interface,
we can extend another class.

Is This Answer Correct ?    6 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why put method is used?

1010


Can we have return statement in finally clause? What will happen?

964


What an i/o filter?

1017


How will you reverse a link list without using recursion?

1033


When should I use a singleton?

1049


Why is it important to initialize a variable?

992


I want to control database connections in my program and want that only one thread should be able to make database connection at a time. How can I implement this logic?

1101


Is java a utf 8 string?

973


What is the gregoriancalendar class in java programming?

1042


Explain about serializable interface in java?

997


Where is const variable stored?

934


How many types of variables are there?

1128


What is variable argument in java?

1003


Why singleton is not thread safe?

992


What is classname class in java?

1067