Search Interview Questions
| 3364 questions in repository.|
There are more than 900 unanswered questions.
Click here and help us by providing the answer.
Have a video suggestion.
Click Correct / Improve and please let us know.
|Java - Interview Questions and Answers|
|Ans. It's a choice to be made whether to use first approach ( Thread class ) or second approach ( runnable interface ) by the programmer. The second facility has been given for cases where your class is already extending some parent class and hence cannot extend another class ( for Thread ) as Java doesn't allow multiple inheritance.|
|Help us improve. Please let us know the company, where you were asked this question :|
|Like Discuss Correct / Improve  java   threads   multithreading   runnable interface  concurrency|
|Why do we need Thread class even in case we execute thread using runnable interface ?|
|Why do we use Thread Class as well as Runnable Interface for creating threads in Java ?|
|What is the there only one method declared in Runnable interface?|
|How executor service is better than using primitive Threading mechanism using Thread class or runnable Interface ?|