Home » JAVA Programming » Multithreading » Question
  1. Which of this method can be used to make the main thread to be executed last among all the threads?
    1. call()
    2. join()
    3. stop()
    4. sleep()
    5. None of these
Correct Option: D

By calling sleep() within main(), with long enough delay to ensure that all child threads terminate prior to the main thread.



Your comments will be displayed only after manual approval.