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

Why string is not thread safe?

1008


Explain constructors and types of constructors in java.

1111


What are the different approaches to implement a function to generate a random number?

1059


Explain the concept of proper inheritance?

1068


Explain where variables are created in memory?

1014


What are static variables and functions?

1150


What is the size of string?

1092


What differences exist between iterator and listiterator?

1045


Explain the importance of import keyword in java?

1012


placement papaers of spring computing technology

1408


What is numeric function?

1014


How is hashset defined in java?

1039


What is method overloading and method overriding?

1064


Which of the classes will have more memory allocated?

976


Where is stringbuffer stored?

985