posted 12 years ago
hello ranchers
I have a scenario where when a call to particular method is being invoked it shouldn't be able to be invoked by other instances.Take a look into the following code.
my question is the logic method which has been synchronized should not be able to be invoked untill the first invocation finishes it's execution then realized that it's completely a different object so it forms a different entries on the heap which will reffered by x & y.
But i want the invocation of y to be restricted when x is using the logic method, what are the changes to be undergo.