There may be times when the calculations of one thread depend on the completion of another.
Thread.join() gives the programmer the ability to dictate sequential processing. Documentation is here:
https://docs.oracle.com/javase/tutorial/essential/concurrency/join.html
FYI to Kri -- there are several syntax errors in your code. Are your examples essentially intended as pseudocode to give us an idea of what you want to happen?
--Scott