Understanding join() method example

前端 未结 4 466
野趣味
野趣味 2020-12-15 08:22

The Java thread join() method confuses me a bit. I have following example

class MyThread extends Thread {
    private String name;
    private int sleepTime;         


        
4条回答
  •  眼角桃花
    2020-12-15 08:54

    It would terminate in order t1, t2, t3, t4... join causes the currently executing thread to wait until the thread it is called on terminates.

提交回复
热议问题