Create three threads and the main thread. Execute each thread as simultaneous tasks. Display information when exiting each thread.
Read tutorials here about Thread synchronization in Java.
Thread
Java