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 to create thread in java?

Answer Posted / gurpreet singh

there are two ways to creat the thread:
1. by implement Runnable interface
2. by extends Thread
NOW which one is batter apprach
implement Runnable Thread is batter apporach
because in inheritance does not allow its
class to extends more than one...
Where we use mutiple inheritance then we creat
a Thread by using implement runnable interface
that why its batter apporach
ok concept is understood.
Gurpreet singh

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why is abstraction needed?

1029


How do you achieve runtime polymorphism?

1044


What is encapsulation example?

1048


What is destructor in oop?

1024


What is polymorphism and example?

1041


what type of question are asked in thoughtworks pair programming round ?

2205


What is polymorphism in oop example?

1017


What is the real time example of inheritance?

1136


What are the benefits of polymorphism?

1254


IS IT NECESSARY TO INITIALIZE VARIABLE? WHAT IF THE INSTANCE VARIABLE IS DECLARED final ? IS IT NECESSARY TO INITIALIZE THE final VARIABLE AT THE TIME OF THEIR DECLARATION?

2059


What is difference between data abstraction and encapsulation?

1071


What is meant by oops concept?

1035


What is the point of oop?

1169


What is abstraction oop?

1076


What is the difference between static polymorphism and dynamic polymorphism?

1074