"I have a XYZ class in that I have written two methods A and B, Now two threads are operating on one the objects of this class, One thread is in the A method, I want that as soon as second thread calls my B method, thread in method A should immediately stop and come out. Would anybody tell me the solution for this?" "I have a XYZ class in that I have written two