join方法解析
public static void main(String[] args) throws InterruptedException {
//join(),无参数
Thread thread3 = new Thread(() -> {
try {
Thread.sleep(1000);
} catch (InterruptedException e) {
e.printStackTrace();
}
});
Thread thread4 = new Thread(() -> {
try {
thread3.join();
} catch (InterruptedException e) {
e.printStackTrace