What is the function of join() method in Thread class in Java programming language?

Submitted 3 years, 4 months ago
Ticket #319
Views 273
Language/Framework Java
Priority Low
Status Closed

What is the function of join() method in Thread class in Java programming language?

Submitted on Dec 08, 20
add a comment

1 Answer

Verified

The join() method allows one thread to wait for the completion of another thread. For example - If t is a Thread instance, then calling t.join() in the current thread, say the main thread, will cause the main thread to wait until the t thread has completed its execution.

Submitted 3 years, 4 months ago


Latest Blogs