If there are two synchronized methods in one class.
If there are two synchronized methods in one class then what will be the beheviour of the threads accessing the methods.
Synchronization is onobjects, not methods or classes. A thread, entering a synchronized method, synchronizes on the object on which that method is called. Another thread, attempting to synchronize on that object, will be made to wait until the first thread releases it.