0
How Thread.join() method work??
If t1 and t2 are threads are in runnable state if t1.join is called which will undergo waiting state how it actually works??
7 Réponses
+ 2
https://www.javatpoint.com/java-join-method
Maybe it's helpful for you
+ 2
java.lang.Thread.join() method makes one thread to wait until another thread completes its execution.
+ 2
Snehil Pandey Ok thank you
+ 1
https://code.sololearn.com/cqOyhCTEGazV/?ref=app
I'm trying to improve it more.
0
Snehil Pandey yeah but which thread will wait in multiple threads??
0
Shreepriya HA the main one in which the join is called
0
Snehil Pandey sorry I couldn't get it...Is that mean main thread is t1 here in my example??