Friday, 22 April 2016

How can we make sure main() is the last thread to finish in Java program ?


How can we make sure main() is the last thread to finish in Java program ?

We can use Thread join() method to make sure all the threads created by the program is dead before finishing the main function.

No comments:

Post a Comment

Note: only a member of this blog may post a comment.