Les Morgan wrote: ... you have a static object, from your static inner class, so your object is in reality only one object ...
Les Morgan wrote: Rather than having 1 Friend in each Deadlock object, you have one Friend object which is commonly referenced in all of your Deadlock Objects.
Puspender Tanwar wrote:hey Morgan, exactly I was going to reply... leave about the static class.. just explain me how this code is a deadlock
would appreciate if you explain it step wise
Puspender Tanwar wrote:thank you morgan
could you tell that , if there are two threads , on what condition the second thread got the chance if first is running. I mean, like the second thread got the chance when the method called by thread1 is over, or it encounters a wait() or it encounters a return.(hope you understand what I am trying to saying )
what are the conditions when thread2 get the chance by stopping the thread1