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.
As suggested in the book I have modified the method by synchrozing the method call. I end up in getting infinite loop. What is wrong? When I write wait(1000) instead of wait() then also nothing gets printed