Minhaj kaimkhani wrote:...thread class it self implements run() method....
but in case of runnable if you implement runnable interface you have to implement run() method.
Yes. Thread does implement Runnable and it properly overrides the run() method, fulfilling the requirement to override run(). So when you extend Thread you inherit the perfectly good run() method in the Thread class. Note that while it fulfills the technical requirement to fulfill the run() method, it does not fulfill the
practical need to create a usable run() method in your subclass. It compiles, but it's not useful.
On the other hand, if you create a class that implements Runnable, you need to override the run() method. Just in this case, you were technically inheriting Thread's run() method.
Ben