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

We have two methods to create methods the threads.
1. Implementing runnable interface
2. Extending to thread class and overriding run method.
Among these two which one is better and why?
Please explain me in detail.

Answer Posted / venkat

implementing runnable interface is better than extending to
thread why because if u implements from runnable interface u
can have chance to extend one more class.but incase of
extending thread this facility is not there

Is This Answer Correct ?    5 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is java free for businesses?

1062


Which sorting is best in java?

994


Why isn’t there operator overloading?

1061


Explain java coding standards for classes or java coding conventions for classes?

1119


What is the base class in java from which all classes are derived?

969


Is it possible to use string in the switch case?

1040


what is server side caching?

2164


How to connect to a remote database using Applet?

2533


Can extern variables be initialized?

947


What is functional interface in javatpoint?

1043


Under what conditions is an object’s finalize() method invoked by the garbage collector?

1032


What is the role of the java.rmi.naming class?

1055


What is exception hierarchy in java?

1001


What is a null check?

989


Difference between string, stringbuffer and stringbuilder?

1020