I have a question, suppose we have 100 threads e.g T1, T2, T3 . . . T100. I want threads to run in sequence. First T1 completes then T2, then T3….at last T100. Is there any way to implement this ?
You can say each thread prints its Name .
So my output should be
T1 T2 T3 T4.........T100
So basically you want all those thread to run in a single thread. Instead of calling the start method call the run method.
But can you tell us why you created those threads in the first place if you didn't want multi-threaded behaviour.
"Any fool can write code that a computer can understand. Good programmers write code that humans can understand." --- Martin Fowler
Please correct my English.