The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
if in the third case the lock is obtained on only object ref by 'a',then as per k&b page 523 "third party object lock for synchonizing a piece of code gives ability to have more then one lock for code synchronisation within a single object". so i assumed tht 2 locks are obtained for the 3rd code sample.