Synechron Interview Question

Can two threads of two different objects of same class can access a syncronized method in that class or not?

Interview Answer

Anonymous

Jun 12, 2021

Yes, both threads can access the synchronized method in parallel as both have different locks. They are not having the lock on same object.