In Java
suppose I am having a code like
class A {
method A(){
synchronized(this)
{
this.B();
}
}
method B(){
//do modification stuff here
}
}
My question is if one thread works on methodA and other on methodB, then how is my synchronized block getting protected.??