can any one explain the statement …”static synchronized method and non static synchronized method will not block each other -they can run at the same time”
can any one explain the statement …static synchronized method and non static synchronized method
Share
The lock objects are different on the static method and non-static method. The static method uses the Class object as the lock (lock obj:
MyClass.class), while the non-static method uses the instance object as the lock to which the invocation of the method at that time is bound (lock obj:this).