Static is for when you want data shared among all instances of a particular class Or you want to do one thing, but you don't want to create an instance just to get the results. You are using statics all the time and don't even know it
A perfect example is the
Math Class in Java( https://docs.oracle.com/javase/7/docs/api/java/lang/Math.html ). As you can see they are all static functions, the reasoning behind this is, With all of those functions organized together, what if I only wanted to use
"one" of those functions and never use the Math class again? It's a big waste to create a instance of the math class and then use the function.
Non Static, you would have to create an instance
Math
= new Math();
.Function ( input );
Static Example:
Math.Function ( input ) // Done
Good Tutorial
I would also recommend looking up the Design pattern - Singleton . Best way to think about a singleton is a Game Manager in a video game. I want a object to manage all of the resources in the scene and I want to make absolutely sure that only one object can do this or all hell would break loose if you had 2 objects doing the same thing.