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

how to write a program for sending mails between client and server

2020


Can we override the static method?

962


What are the four versions of java?

964


What super () does in java?

856


What is the purpose of static keyword in java?

905


How to use arraylist in java netbeans?

974


What is the final method?

1024


Differences between C and Java?

1115


what is a green thread? : Java thread

953


What is the difference between access specifiers and access modifiers in java?

1097


What is foreach loop in java?

958


Why string is immutable or final in java

1026


Is string pool garbage collected?

948


What is var keyword ?

1126


Is arraylist a class in java?

994