I have a doubt regarding Java Synchronization . I want to know if I have three Synchronized methods in my class and a thread acquires lock in one synchronized method other t
well, there is only one lock per object. and all synchronized methods are locked by this lock. So , whichever thread acquires lock at a time, it is authorized to go through all synchronized methods. But the threads which waits for the lock can't enter into synchronize methods until they get the lock.
So at a time only only thread rules and others have to wait to enter any synchronized method, doesn't matter the ruling thread is executing that method or not.