java - threads running in sequence -
I'm new to Java and I'm wondering how to do something in an interview question.
You have three threads Create 3 threads but do not start them, go as follows Thread waits for a thread to finish adding, so the guarantee of the command is T1 , T2 and T3 . How do you ensure that the order T1 , T2 , T3 .
The interviewer asked me to write this program.
I know that the answer to this question is join or the bottom link but how could I not be able to succeed, can you tell me to do this How about to know?
T1.start (); T1.join (); T2.start (); T2.join (); T3.start ();
Comments
Post a Comment