I understand that if you want to thread you can either extend thread or implement runnable to multithread in java. But why do you have to implement an interface for java to thre
In terms of functionality, there is no difference between implementing Runnable
interface or extending Thread
class. But there might be situations that implementing Runnable
interface could be preferred. Think of the case that your class has to inherit from some other class and also it should show thread functionality. Since your class cannot inherit from multiple classes(Java doesn't support it), your class could implement Runnable
interface in that case.