I am looking for some clarification on static synchronized methods.
Say for example, I have a target runnable named tr created by implementing Runnable. This class name is MyRunner. MyRunner has (besides an overridden run method) two STATIC synchronized methods, methodA and methodB.
In the main of MyTestClass, I have instantiated two
thread objects, named a and b, passing tr as the target. I then start thread a & b, one after another.
Am I to understand there is only 1 lock for Class MyRunner?
And if this is true, then would this imply either method methodA or methodB can ever be running at any one time?
Thanks,