I just have read in the book that static and non-static synchronized methods won't block each other cause of the different locks acquired (Class and this) but I tried to simulate a situation like this and I'm getting problems with it. The code that I prepared is as follows:
But the problem is that they never cross each other, like they hold the one block and wait until each one is finished. It is the first one that completes (counts until 50) and then the second or the other way round. What is wrong? Could any one correct me?