Do two synchronized methods execute simultaneously
If t1 access the m1 method (synchronized method), could t2 thread access m2 method (synchronized method) simultaneously? The synchronized keyword applies on object level, and only one thread can hold the lock of the object. So as long as you’re talking about the same object, then no, t2 will wait for t1 to release the … Read more