top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

In Java Can a thread hold multiple locks at the same time?

+2 votes
401 views
In Java Can a thread hold multiple locks at the same time?
posted Mar 1, 2015 by Amit Kumar Pandey

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

0 votes

CAN THREAD HOLD MULTIPLE LOCKS AT THE SAME TIME:

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.

answer Mar 10, 2015 by Karthick.c
...