joinメソッドの動きがよくわからない。。。という記事を見かけて、久しぶりにJavaでプログラムを書きました。 joinメソッドは、th.join();という文を実行したとき、その文を実行したスレッドAは、thというインスタンスが管理しているスレッドBが終了するのを待つ、ということですね。 以下、それほどわかりやすくはないですが、簡単なプログラム。 class Main { public static void main(String[] args) { System.out.println(Thread.currentThread() + ": Start. (A)"); try { Thread th = new Thread() { public void run() { try { System.out.println(Thread.currentThread() + ": Sta