Forums Register Login
What happens if we call join(), before start()?
What happens if we call newThread.join(), before newThread.start(), let's say, in main method (thread)? I didn't see any effects...
Nothing. The method just returns... which you have seen.

Following is the implementation of Thread.join(long millis). Calling newThread.join() leads to join(0) being called which in turn,as Henry said,causes the method to return,because isAlive() for a thread that has not been started would return false.

This thread has been viewed 2213 times.

All times above are in ranch (not your local) time.
The current ranch time is
Dec 11, 2018 08:56:51.