Hi all,
Please check the following code:
Despite of the method callMe being synchronized, when I run the program, I get the following output:
I would expect one of the threads to enter the callMe() method and stall it, so that the second
thread cannot enter it at all! Can someone please help me understand the output? Also, if there is something wrong here, how do I correct it so as to allow only one thread to enter the method?
Thanks,
NP