By calling sleep() within main(), with long enough delay to ensure that all child threads terminate prior to the main thread.
Previous Question Next Question
Your comments will be displayed only after manual approval.