Which Thread method makes the calling thread wait until another thread has finished?
Correct answer A. join()
Explanation
Calling t.join() blocks the current thread until thread t terminates, which provides a simple way to wait for its work. The sleep method pauses for a fixed time regardless of other threads, yield is only a scheduling hint, and notify wakes a thread waiting on a monitor. A timed form of join also exists.
Answer checked How we write and check questions
Discussion