Java: I have shared variable(of type Object) whose value will be changed very frequently by different threads. Accessing this variable's value from other method by some other set of threads, will give any corrupted value (the value that is not at all assigned) ? Does any problem will happen when the variable is accessed at the time of reference swapping ???
// this method will be called very frequently
public void changeValue(Object value)
{
this.value = value;
}
// will this method call return an invalid memory reference ?
public Object getValue()
{
return value;
}