posted 17 years ago
I modified money withDrawal illustration in K&B book by putting makeWithDrawal() method in another class called AccountTrans.
But I got different behaviour/output, until I put that line which called makeWithDrawal() in synchronized(this) block.
anyone can explain why I need to synchronized on "this" object and
synchronized on "public void makeWithDrawal" doesn't work anymore?
hope make sense