Take a look at line #7. You are creating a new Thread object, but not specifying the target which contains the run() method.
Post by:Norm Radder
, Master Rancher
why I am getting wrong output?
What should the correct output be? Please post an example of the correct output.
Post by:Piet Souris
, Master Rancher
Assuming OP had this in mind:
output can be:
Runnable: two started to run.
Runnable: three started to run.
Runnable: one started to run.
two : 0
three : 0
two : 1
one : 0
two : 2
three : 1
three : 2
three : 3
three : 4
three : 5
two : 3
one : 1
two : 4
two : 5
two : Complited
three : Complited
one : 2
one : 3
one : 4
one : 5
Post by:Norm Radder
, Master Rancher
Deleted
Post by:Knute Snortum
, Sheriff
(1 like)
We can't put the genie back in the bottle, but let's not post complete solutions in the future. Illustrations are fine.
Post by:Norm Radder
, Master Rancher
I agree 100%. My post was to test what this forum's policy was.