What does the ReentrantLock class provide that a synchronized block does not?

Last Updated :
Discuss
Comments

What does the ReentrantLock class provide that a synchronized block does not?

The ability to restrict a thread from acquiring the lock

The ability to handle deadlock situations automatically

The ability to acquire a lock multiple times by the same thread

The ability to synchronize only one block of code at a time

Share your thoughts in the comments