Tuesday, 13 August 2013

Effect of synchronized(static variable)

Effect of synchronized(static variable)

What is the effect of having a synchronized using a static variable?
public class Something {
public static final String LOCK = "lala";
public void doSomething(){
synchronized(LOCK){
...
}
}
}

No comments:

Post a Comment