Java - Advantages and Disadvantages of static variables and static methods


Can do meta object operations ( like validating something before creating objects , keep count of number of objects )

Can do operations which have nothing to do with objects but still you want them to be tied to Class.


Commonly used to static variables sometime leads to problems due to access by different objects.

Are not tied to objects so doesn't reflect pure Object Oriented approach.

Needs to be synchronized so as to avoid update conflicts by mutiple objects and threads.