Domanda di colloquio di Bolt

What does the synchronized keyword do

Risposta di colloquio

Anonimo

24 mag 2019

I described using the monitor to lock, blocking other invocations of sync methods under the same object (monitor) until the lock is released and all threads could see the same values (they didn't seem to like this answer)