Hi
I am a bit confused on how two threads access a single object
Assume the following
class abc{
public void printer(){
int a =0;
int b=0;
a++;
b++;
System.out.println(a + " this is a and b is " + b );
}
}
Now assuming two threads access the method printer(). I am confused how the local variables are managed..
In the sense do the two threads have their stack variables in the sense that do they have their very own vairable a and variable b?
Or
Do they share a common set of local variables in the printer method ?
Regards