Can a thread hold multiple locks at the same time?
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.
No comments:
Post a Comment