What is the difference between the Join() method and the Synchronized statement?

Asked

Viewed 86 times

-2

I’m having trouble knowing the difference between the method Join() and the modifier Synchronized.

1 answer

2


join() interrupts the execution of thread current until the thread who invoked the method join() be fully executed.

synchronized prevents multiple threads execute a code block or access a variable at the same time.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.