Greetings,
I'm trying to solve the following task: Given N threads, make them run consecutively. For example each of them should output it's number in the following order:
Thread 1 Thread 2 ... Thread N
How do I do this, using only wait/notify and synchronized methods (without flags, etc)?
P.S. Sorry for my poor english :)