If the thread wants to wait until completing some another thread then we should go for join method.
Syntax:
- public final void join() throws interruptedException
- public final void join(long ms) throws interruptedException
- public final void join(long ms, int ns) throws interruptedException