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

How to create a thread in java?

1089


What is the difference between stored procedure & function?

930


How do I convert a numeric ip address like 192.18.97.39 into a hostname like java.sun.com?

972


Can I extend singleton class in java?

1044


Considering notepad/ie or any other thing as process, what will happen if you start notepad or ie 3 times? Where 3 processes are started or 3 threads are started?

1107


What is general methodology?

989


What is dynamic binding(late binding)?

983


Explain jvm, jre, and jdk?

962


Difference between string, stringbuffer and stringbuilder?

990


What is string [] args?

961


What is the difference between == and === javascript?

1100


Explain list interface?

916


Name component subclasses that support painting in java programming?

1018


Differentiate storage classes on the basis of their scope?

1121


Is singleton thread safe in java?

923