Originally posted by Gaurav Gupta:
There are two synchronized methods in a single object. Two thread try to talk it, one accessing method 1 and other accessing method 2. Can they access these methods simultaneously?
No, that's the whole point of synchronization. Every synchronized method is associated with a lock. For member methods, the object itself is the lock. Two separate threads can't own the same lock at the same time, so only one of the two threads could proceed. The other couldn't enter the method it called until the first was through with its method.
What would be the difference if I make one of these two methods as static?
Static methods use the Class object as a lock, so the two threads would be using different locks, so they could both proceed.