First of all, the concept of reentrant locks means that a thread can enter any block of code synchronized by the lock it owns.
An example of a reentrant lock
public class AccountService{ private int account; private ReentrantLock lock = new ReentrantLock(); public void inCreaseAccount(){ lock.lock(); account++; lock.unlock(); } }