James Peterson wrote:Hi shashank dwivedi,
As the methods are defined in different classes the locks will be different. The synchronization will depend on the object for the class you initialized. If you are accessing a method of a class that is synchronized using obj1 object then obj2 object of that class cannot access same synchronized method.
Regards,
James
Shashank Dwivedi wrote:Thanks James