We have two methods here one is synchronized and the other is not. When an object of this class is locked, only one
thread can access method1() but any number of threads can access method2(). while method1() runs,
method2() also can simultaneously change the value of i which is used by method1() (method1 will see a different value for i, since it was altered by method2), since it is accessible by any number of threads. Is this not making the purpose of 'synchronized' void?
[ July 19, 2006: Message edited by: Arul Jose ]