Java Thread Join:
→ join() method waits for a thread to die.
→ It causes the currently running threads to stop executing until the thread it joins with completes its task.
Thread sleep() method:
The sleep() method of Thread class is used to sleep a thread for the specified amount of time.
Thread class sleep methods:
→ public static void sleep(long miliseconds)throws InterruptedException
→ public static void sleep(long miliseconds, int nanos)throws…