Hi my doubt is in java.My doubt is on creating
thread by implementing runnable interface.
Please see the below programme.
In below programme I have implemented the class countdowneven from Runnable.
In main method I am passing the object of countdown even to constructor of thread class.
Why should we pass the object of countdowneven to constructor of thread class?
What operations will be performed by Thread class constructor on object of countdowneven?
-------------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------------------------
Output:
10
8
6
4
2