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.

Wink, wink, nudge, nudge, say no more ... https://richsoil.com/cards

This thread has been viewed 1947 times.

All times above are in ranch (not your local) time.
The current ranch time is
Jan 18, 2018 05:18:16.