This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
Getting a deadlock is very unlikely to happen so usually..you will get an output under normal condition. Here by putting sleep method in .I am making it more probable for a deadlock to happen. I many situations..even without a sleep() method..the thread scheduler can behave in such way..that creates deadlock situation.