Can a thread hold multiple locks at the same time?

Solution

Yes. A thread can hold multiple locks at the same time. Once a thread acquires a lock and enters into the synchronized method / block, it may call another synchronized method and acquire a lock on another object.

Share this thread

Comments

Comments
comments powered by Disqus

Navigation

Social Media