KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
class Bob { private static final Object locke = new Object(); private static volatile int value; public static void fun(){ synchronized(locke){ value++; } } } How is this different from synchronizing on the class, i.e. synchronized(Bob.class){...}
Tags (comma-separated)
Save Edits
Cancel