Originally posted by Divya Gehlot:
...can we use synchronised keyword with static methods...
Yes (if you spell it "synchronized").
Remember, each instance has its own lock, but there is also a class lock. If "synchronized" is used with a static (class) method, then the
class lock must be obtained.