Hello,
When we have a static synchronized method in a subclass is the lock acquired for super and subclass or subclass only?
My question is, when method run invokes metB from B is lock for A.class and B.class acquired or lock for B.class only? Both methods access static variable a that is defined in A so there can be concurrent access problem when second
thread accesses metA in class A. And what about situation in which static method form superclass is redefined in subclass, is there any difference?
When synchronization is involved does it mean that lock for the object (or class) and all the locks for its superclasses' objects (or classes respectively) are acquired?
Thank you in advance
[ October 14, 2007: Message edited by: Wielki Szu ]