Skip to content
Advertisement

Tag: synchronize

Synchronized keyword and static classes in java

I was reading a threading tutorial that’s originally from (I believe) the IBM developerworks site. In it they talked about the synchronized keyword and how a synchronized block of code is locked by the actual object, not the block of code itself. For instance, in the code below the authors state that even though the static class ‘Thingie’s setLastAccess method

Advertisement