I came across this example on Oracle\'s Java Tutorial describing Deadlock in multi threading scenarios.
So in this example I made following change at line 17 and lin
To support the rest of the answers here with some actual proof I ran your code in a loop and it deadlocked 82 times out of 100 tries, so your code most definitely still deadlocks.