I made this post to make the point that
implementing all the methods in the interface does not mean implementing the interface. In the code implementing the run method does not mean that one implements the Runnable interface. thus
Code 1:
is not the same as
Code 2:
Also the thread constructor not only takes a Runnable interface as a prarameter but can also take a Thread object as a parameter . for example
this is possible as the thread class itself is defined as
public class Thread extends Object implements Runnable
and since Thread class itself implements Runnable it can be passed as a parameter to the Thread constructor.
Vidhya,
Thanks for the complements. Complements really motivate.
Regds.
Rahul P. Mahindrakar [This message has been edited by Rahul Mahindrakar (edited August 21, 2000).]