Reentrant Read-Write Lock The explicit lock implemented by the ReentrantLock class is mutually exclusive—that is,…