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 / harish

When u extend a Thread each of your thread has a unique
object associated with it,where as with Runnable interface
may threads share the same object instance.

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the types of methodology?

1086


What are the basic interfaces of java collections framework?

1104


What is the difference between Error, defect,fault, failure and mistake?

1196


What is the inheritance?

969


What value is a variable of the string type automatically initialized?

1107


how to create multithreaded program? Explain different ways of using thread? When a thread is created and started, what is its initial state? Or extending thread class or implementing runnable interface. Which is better? : Java thread

1024


Is overriding possible in java?

947


Is a char always 1 byte?

978


How would overload a function based on return type?

949


What is externalizable interface?

1092


What is the dot operator?

993


Write a method to check if input string is palindrome?

1015


What is double data type?

935


How do I stop concurrentmodificationexception?

1024


What is the difference between yield() and sleep()?

1005