The ______ method of the Lock interface is used to acquire the lock.

  • acquire()
  • lock()
  • tryLock()
  • unlock()
The lock() method of the Lock interface is used to acquire the lock. It blocks until the lock is available and then acquires it. The unlock() method is used to release the lock. The acquire() and tryLock() methods are not part of the standard Lock interface in Java.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *