From K&B book - Chapter 9 on Threads Pg 522 under synchronization and Locks
If two methods are synchronized in a class, only one thread can be accessing one of the two methods. In other words, once a thread acquires the lock on an object, no other thread can enter any of the synchronized methods in that class (for that object). I wrote a small example to try this out thinking I would get the same final value for the thread T1 , T2 and T3 i.e 10 but that does not seems to be the case from the above statement and the code I was expecting this ?? I am new to threading so help me out ppl.
Thanks in advance