PrepZone Logo
PrepZone
Back to Java

Java · Medium

Can two threads access different synchronized methods on the same object simultaneously?

JavaConcurrency

Answer preview

No. — The synchronized keyword on instance methods locks on the object's intrinsic monitor (this). Only one thread can hold the monitor at a time.…