Issue
The Java documentation says:
it is not possible for two invocations of synchronized methods on the same object to interleave.
What does this mean for a static method? Since a static method has no associated object, will the synchronized keyword lock on the class, instead of the object?
Solution
Since a static method has no associated object, will the synchronized keyword lock on the class, instead of the object?
Yes. :)
Answered By - OscarRyz
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.