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

how many ways to create Thread and which one is good?
runnable interface ot Thread class?

Answer Posted / srinu

Two ways of creating Thread
1)By extending java.lang.Thread class
2)By implementing java.lang.Runnable interface
Here 2"nd way is good because by using interface we can
implement multiple inheritance in our class

Is This Answer Correct ?    7 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why we use multi threading instead of multiprocessing?

1063


What are predicates in java 8?

1016


What is object in java?

983


What is use of map in java?

1011


when a request is generated from apache tomcat 5.5 and goes to oracle 10g or mysql,,, how the oracle or mysql reads the request as apache is a web server and oracle 10g is application server? when the oracle 10g provides response, how the apche tomcat reads it???

2162


Differentiate between class and structure.

1132


What is a method type?

1003


In which language java is written?

977


How do you sort objects in java?

958


Is string a data type in java?

1020


What are the different ways of creating thread?

1009


What are different types of classloaders?

1017


How can you say java is object oriented?

1066


What is null data type?

1096


Difference between a class and an object?

1033