You describe cases when you used static, but that doesnβt quite explain why you use static and non-static - this is more than just keywords for constants and utility methods.
When something is not static (instance), it means that for every instance of the class there is an instance. Everyone can change independently.
When something is static, it means that for all instances of the class there is only one copy of it, so changing it from anywhere affects everyone else.
Static variables / methods usually use less memory because there is only one copy of them, no matter how many class instances you have. Static when used properly, is great for object oriented design.
If you have a method / variable that only needs one instance (for example, a constant or utility method), just make it static. Understand that creating a static method means that you cannot override it. Therefore, if you have a method that you want to override in a subclass, do not make it static.
The general rule is that if you need only one copy of it, make it static. If you need a copy per instance, make it non-static.
source share