harshvardhan ojha wrote:
also you got public void run() from superclass. Got it??
Hey thanks for the quick reply
Do you mean run() method is inherited from Addition into RunnableTest by your last statement?
Yes, that is correct. And doing so fulfills the Runnable interface's requirements. But it isn't really good practice since it makes it harder to associate the implemented method (run()) with the interface that requires it (Runnable). Either Addition should implement Runnable since it has the run() method, or the run() method should be moved to RunnableTest class since it implements Runnable. Either way, the 'implements Runnable' and run() method should be in the same class to keep things easy.