Kee Kee moon wrote:
It will produce the same result, account will not be overdrawn, by using either join() or synchronized. Which one is better, join() or synchronized and why.
Thank you very much in advance.
These are two differnt mechanism, that are only somewhat related. Synchronization is a locking mechanism that allows to threads to not step on each other. The join() method call allows one
thread to wait for the completion of another thread. In fact, the join() method actually uses synchronization under the covers.
Henry