I undesrtand that the use of having a synchronized method is, no 2 threads will try to execute one method at a time and corrupt the state of an object. So synchronized is useful when it come to instance methods. But what's the use of having a synchronized static method? Thanks JEAN.
Synchronizing static methods is useful when the method accesses a shared "static" resource, such as a static field, an external resource etc.
A static method synchronizes on the Class object of the class it is declared on (instead of "this").
The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus