I was going through java class in which I found all the methods were static , I want to know when there is the requirement or where the condition arises when we have to prefix static in front of all the methods. Is it any kind of design pattern..?
Share
Helper classes usually provide static only methods. These are classes that provide some methods that are not specific just to one kind of object, but can be shared across the entire project. For instance, a MathHelper could define a method for calculating the average of an array of float values, another one for calculating the distance between 2 points and so on.