Although, in the real world application you are much more likely to implement Runnable interface than extends Thread. Extending the Thread class is easiest but not a good Object Oriented practice.
In this post we will see the difference between "implements Runnable" and "extends Thread". This is one of the basic interview question on the topic of Threads.
Read Also : Life Cycle of Thread in Java
1. Inheritance Option: The limitation with "extends Thread" approach is that if you extend Thread, you can not extend anything else . Java does not support multiple inheritance. In reality , you do not need Thread class behavior , because in order to use a thread you need to instantiate one anyway.
On the other hand,
Implementing the Runnable interface gives you the choice to extend any class you like , but still define behavior that will be run by separate thread.
2. Reusability : In "implements Runnable" , we are creating a different Runnable class for a specific behavior job (if the work you want to be done is job). It gives us the freedom to reuse the specific