Originally posted by shyam kumarK:
once a thread starts run method any other thread cant enter that method because it is a synchronized method..
Any other thread trying to enter this method for _this_ object must wait.
in your first code example:
thread a1 is calling run, so it must acquire lock on object a1, OK, running
thread a2 is calling run, so it must acquire lock on object a2, OK (nobody owns lock on a2), running